我已经在appcenter中配置了用于构建和分发的react原生应用程序。一切都运行得很好,突然之间,构建失败了,错误如下
> Task :app:stripReleaseDebugSymbols FAILED
Support for ANDROID_NDK_HOME is deprecated and will be removed in the future. Use android.ndkVersion in build.gradle instead.
> Task :app:mergeExtDexRelease
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:stripReleaseDebugSymbols'.
> No toolchains found in the NDK toolchains folder for ABI with prefix: arm-linux-androideabi
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.点击这个链接https://github.com/microsoft/appcenter/issues/2144并更新了我的成绩文件
buildscript {
ext {
ndkVersion = "20.1.5948944"
}
dependencies {
classpath("com.android.tools.build:gradle:4.1.0")
}和gradle-wrapper.properties到
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip在此之后,构建工作,但构建后分发的应用程序无法在设备上安装,并出现“应用程序未安装”错误。我尝试了不同的版本,到目前为止都没有成功。
发布于 2021-10-27 09:15:45
我通过以下设置修复了这个问题
在graddle-wrapper.properties中将distributionUrl更新为
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip在安卓/build.gradle更新的gradle版本为
classpath("com.android.tools.build:gradle:4.2.0")已将react-native版本更新为0.65.1
npm i react-native@0.65.1已更新所有相关包,以便与此react本机版本兼容
npm update "react-native"在此之后,我可以在appcenter中构建它,并能够分发和安装应用程序
发布于 2021-10-19 08:08:29
也有类似的问题。在通过查看构建日志检查了VSAC支持哪些ndk版本之后,我用以下ndk版本更新了android/build.gradle &它起作用了。
buildscript {
ext {
...
ndkVersion = "18.1.5063045"
}
...
}https://stackoverflow.com/questions/69613642
复制相似问题