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打包即可。

posted @ 2020-07-13 17:31  野生野鸡码农  阅读(531)  评论(0编辑  收藏  举报