react-native打包apk报错
Posted oldz
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了react-native打包apk报错相关的知识,希望对你有一定的参考价值。
Task :voicesdk:verifyReleaseResources FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ‘:voicesdk:verifyReleaseResources‘. > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade > Android resource linking failed /Users/z/.gradle/caches/transforms-2/files-2.1/37631cd0ab1b46aeb23414622984ad25/appcompat-1.0.2/res/values-v26/values-v26.xml:5:5-8:13: AAPT: error: resource android:attr/colorError not found. . . . * 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. * Get more help at https://help.gradle.org Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. Use ‘--warning-mode all‘ to show the individual deprecation warnings. See https://docs.gradle.org/6.2/userguide/command_line_interface.html#sec:command_line_warnings BUILD FAILED in 30s 55 actionable tasks: 51 executed, 4 up-to-date npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! sometest@0.0.1 build_android: `cd android && ./gradlew assembleRelease` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the sometest@0.0.1 build_android script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /Users/z/.npm/_logs/2020-07-13T09_07_16_953Z-debug.log The terminal process "/bin/bash ‘-c‘, ‘npm run build_android‘" terminated with exit code: 1.
出现这种情况,请不要用命令行打包,直接使用Android studio打包即可。
以上是关于react-native打包apk报错的主要内容,如果未能解决你的问题,请参考以下文章
安卓转战React-Native之签名打包成Apk并极速多渠道打包