react-native打包apk常见错误收集
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常见错误收集的更多相关文章
- React Native 打包 Apk
第一步:生成秘钥库 keytool -genkey -v -keystore opsmart-android-release-key.keystore -alias opsmart-android - ...
- [RN] React Native 打包时 减少 Apk 的大小
React Native 打包时 减少 Apk 的大小 主要有两个方法: 在打包前设置 android\app\build.gradle 文件中 1) def enableProguardInRele ...
- samba配置中常见错误收集.txt
在命令行输入命令: ~$ smbclient -L \\127.0.0.1按要求输入密码后,提示出错:session setup failed: NT_STATUS_LOGON_FAILURE 这是因 ...
- 杂项-Grunt:grunt build 打包和常见错误
ylbtech-杂项-Grunt:grunt build 打包和常见错误 1. 安装.打包返回顶部 1. npm WARN deprecated coffee-script@: CoffeeScrip ...
- React Native之APK文件签名及打包
生成apk签名文件 我们使用android studio的方式进行签名 AS工具栏找到并点击 build->gennrate signed apk 两种情况: 1.这里如果已经有签名文件了则直接 ...
- React native开发中常见的错误
react native环境搭建请移步:react native环境搭建 这里说说react native创建完成之后,运行中出现的常见问题, 问题1: java.lang.RuntimeExcept ...
- react native 生成APK
参考地址:React native Android 命令 打包apk 首先:尝试使用模拟器测试 这里是因为需要确认目前在电脑上的模拟器是可以正常运行的,并且,开发React native的应用程序,肯 ...
- React Native Build Apk
1 React Native安卓项目打包APK 1.1 产生签名的key 先通过keytool生成key 1 keytool -genkey -v -keystore demo-release-key ...
- React Native 打包.jsx文件
最近在研究React Native.感觉开发效率确实不错,但jsx语法写起来感觉不怎么顺手. 试用了Sublime Text 3和Visual Studio Code写代码,感觉反应总是慢一拍. 还是 ...
随机推荐
- UITableViewCell添加点击时改变字体的颜色、背景、图标
改变字体颜色:cell.textLabel.highlightedTextColor 改变背景颜色:cell.selectedBackgroundView (必须是图片哦) 改变图标颜色:cell.i ...
- RobotFramework自动化测试框架(2)- RobotFramework语法
RobotFramework测试用例是由四部分组成的,下面就从这四个部分简单介绍语法: 关键字表 *** Keywords *** 设置表 *** Settings *** 变量表 *** Varia ...
- UML 图中类之间的关系:依赖,泛化,关联,聚合,组合,实现
http://www.uml.org.cn/oobject/201211231.asp 1. 关联 一个类作为另外一个类的变量:在UML类图中,用实线连接有关联关系的对象所对应的类 2.聚合 表示整体 ...
- css width
转载:http://blog.csdn.net/dddddz/article/details/8631655
- [CQOI2014]通配符匹配
Description 几乎所有操作系统的命令行界面(CLI)中都支持文件名的通配符匹配以方便用户.最常见的通配符有两个,一个是星号(""'),可以匹配0个及以上的任意字符:另一个 ...
- 洛谷 P3400 仓鼠窝
卡常 #pragma GCC optimize(2) #include<cstdio> #include<algorithm> #include<cstring> ...
- Appium + Python自动化 - 元素定位uiautomatorviewer
元素定位主要介绍如何使用uiautiomatorviewer,通过定位到页面上的元素,然后进行相应的点击等操作.uiautiomatorviewer是android-sdk自带的一个元素定位工具,非常 ...
- Linux下cpu过高问题排查
原文地址:https://blog.csdn.net/chenjunan888/article/details/80447800 在服务器报cpu过高时,可使用以下命令,快速导出堆栈信息,以方便查看具 ...
- Bootstrap中的datetimepicker浅谈
从古至今,人们都习惯用某个时间来标记某个事件的发生.我们在写管理后台的时候,重中之中也是这个时间的设置.在问题出现的时候,我们是查看日志的时候,就可以根据这个时间段来查找这个问题出现点. 在使用时间控 ...
- android studio 定时器操作 实现定时执行相关任务
package ipget.wenzheng.studio.ipget; import android.os.Bundle; import android.os.Handler; import and ...