react-native 0.59打包报错,信息如下,根据错误信息是因为react-native-cookies的sdk版本问题导致的

 ./gradlew assembleRelease

 > Configure project :react-native-cookies
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: The specified Android SDK Build Tools version (25.0.2) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.3.1.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '25.0.2'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools. > Configure project :react-native-webview
:react-native-webview:reactNativeAndroidRoot F:\WorkSpace\CP_HY\node_modules\react-native\android > Task :app:bundleReleaseJsAndAssets
warning: the transform cache was reset.
Loading dependency graph, done.
info Writing bundle output to:, F:\WorkSpace\CP_HY\android\app\build\generated\assets\react\release\index.android.bundle
info Done writing bundle output
info Copying 50 asset files
info Done copying assets > Task :react-native-cookies:verifyReleaseResources FAILED FAILURE: Build failed with an exception. * What went wrong:
Execution failed for task ':react-native-cookies:verifyReleaseResources'.
> java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
error: resource android:style/TextAppearance.Material.Widget.Button.Borderless.Colored not found.
error: resource android:style/TextAppearance.Material.Widget.Button.Colored not found.

根据错误信息,我们找到react-native-cookies下的andorid/build.gradle,修改skd版本如下

android {
compileSdkVersion 28 // 23 ->28
buildToolsVersion "28.0.3" // 25.0.2 -> 28.0.3 defaultConfig {
minSdkVersion 16
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
lintOptions {
abortOnError false
}
}

重新打包即可;

一般打包react-native应用时,最常见的错误就是第三方插件的sdk版本和react-native中android中的sdk版本不一致导致,这个时候不要慌,修改版本依赖,重新打包即可

react-native打包apk常见错误收集的更多相关文章

  1. React Native 打包 Apk

    第一步:生成秘钥库 keytool -genkey -v -keystore opsmart-android-release-key.keystore -alias opsmart-android - ...

  2. [RN] React Native 打包时 减少 Apk 的大小

    React Native 打包时 减少 Apk 的大小 主要有两个方法: 在打包前设置 android\app\build.gradle 文件中 1) def enableProguardInRele ...

  3. samba配置中常见错误收集.txt

    在命令行输入命令: ~$ smbclient -L \\127.0.0.1按要求输入密码后,提示出错:session setup failed: NT_STATUS_LOGON_FAILURE 这是因 ...

  4. 杂项-Grunt:grunt build 打包和常见错误

    ylbtech-杂项-Grunt:grunt build 打包和常见错误 1. 安装.打包返回顶部 1. npm WARN deprecated coffee-script@: CoffeeScrip ...

  5. React Native之APK文件签名及打包

    生成apk签名文件 我们使用android studio的方式进行签名 AS工具栏找到并点击 build->gennrate signed apk 两种情况: 1.这里如果已经有签名文件了则直接 ...

  6. React native开发中常见的错误

    react native环境搭建请移步:react native环境搭建 这里说说react native创建完成之后,运行中出现的常见问题, 问题1: java.lang.RuntimeExcept ...

  7. react native 生成APK

    参考地址:React native Android 命令 打包apk 首先:尝试使用模拟器测试 这里是因为需要确认目前在电脑上的模拟器是可以正常运行的,并且,开发React native的应用程序,肯 ...

  8. React Native Build Apk

    1 React Native安卓项目打包APK 1.1 产生签名的key 先通过keytool生成key 1 keytool -genkey -v -keystore demo-release-key ...

  9. React Native 打包.jsx文件

    最近在研究React Native.感觉开发效率确实不错,但jsx语法写起来感觉不怎么顺手. 试用了Sublime Text 3和Visual Studio Code写代码,感觉反应总是慢一拍. 还是 ...

随机推荐

  1. adb的含义

    ADB全名Andorid Debug Bridge. 是一个Debug工具.为何称之为Bridge呢?因为adb是一个标准的C/S结构的工具, 是要连接开发电脑和调试手机的.包含如下几个部分: 1.C ...

  2. Nagios安装与部署

    Nagios概述: Nagios是一款开源免费(也有收费版的Nagios XI)的监控工具,可以用以监控Windows.Linux.Unix.Router.Switch,可以监控指定主机的物理基础资源 ...

  3. CentOS6.5下中文输入法的相关问题

    问题.点击Input Method Preferences没反应. 首先执行 yum install "@Chinese Support" yum install -yibus-t ...

  4. 【转】Android中实现IPC的几种方式详细分析及比较

    1.使用Bundle   ----> 用于android四大组件间的进程间通信android的四大组件都可使用Bundle传递数据  所以如果要实现四大组件间的进程间通信 完全可以使用Bundl ...

  5. # Transition:添加弹出过渡效果

    # Transition:添加弹出过渡效果 通过鼠标的单击.获得焦点,被点击或对元素任何改变中触发,并平滑地以动画效果改变CSS的属性值. W3C-transition MDN-transition ...

  6. 深入理解Java的整型类型:如何实现2+2=5?

    先看下这段神奇的Java代码: public static void main(String[] args) throws Exception { doSomethingMagic(); System ...

  7. ldap_modify: No such object (32) matched DN: cn=config

    centos 6.9 部署 kerbors ldap 报错 [root@hadoop data]# ldapmodify -Y EXTERNAL -H ldapi:/// -f chdomain.ld ...

  8. BI结构图及自动建表结构图

  9. attr和prop的区别

    由于prop(property的缩写)和attr(attribute的缩写)翻译成汉语,均有“特性.属性”等意思的原因,导致大家容易混淆分不清. (1)在处理自定义时属性时,用attr(),若用pro ...

  10. 日常[splay]:水题记——营业额统计

    没错这就是让我深陷splay之中的罪魁祸首,昨天打了一下午结果发现是玄学错误的那个 人生第一棵splay平衡树 题目大意:求一段序列,小于当前元素的最大值和大于当前元素的最小值.从该元素前面的元素找. ...