react-native Android release打包失败
npm run build报错(android)
react-native 0.5x
在安卓环境 gradle 3.x
版本下编译release版本的时候提示编译失败,但是debug模式下是没有问题的。
错误信息
Could not find com.android.tools.lint:lint-gradle:26.1.1
Execution failed for task ‘:app:processReleaseResources’
Execution failed for task ‘:app:lintVitalRelease’
解决方案
- 在
android/gradle.properties
里添加
android.enableAapt2=false
- 在
android/app/build.gradle
中添加
lintOptions {
abortOnError false checkReleaseBuilds false
}
ps: 这一步可能不需要
本博客所记录的文章,主要是从网络收集的,有一些因为经过多次转载,所以出处已经不知,若是侵权,请通知我,我及时修改。本博客主要是用来记录我对所写文章的理解,若有错误,请大家指点,相互学习!