我正在 React Native 中开发一个应用程序,在我的设备上测试时它运行完美,但是当我想要构建它时,构建失败并给我一个错误。我到处寻找信息,但一无所获,我很绝望。如果有人可以帮助我,我将不胜感激。
[...]
209 actionable tasks: 209 executed
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.ResourceCompilerRunnable
> Resource compilation failed (Failed to compile values resource file /home/expo/workingdir/build/android/app/build/intermediates/incremental/release/mergeReleaseResources/merged.dir/values/values.xml. Cause: java.lang.IllegalStateException: Can not extract resource from com.android.aaptcompiler.ParsedResource@57d454a9.,Can not extract resource from com.android.aaptcompiler.ParsedResource@71679b12.). Check logs for more details.
* 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
BUILD FAILED in 4m 35s
Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.
我发现的一件事是放置了错误的颜色或尺寸,但这是 Android Studio 的帮助,在 React Native 中,如果是这样的话我会收到错误(即使如此,我已经检查了数千次) 。 感谢所有不辞辛劳阅读此消息的人。谨致问候!
查找信息、浏览代码、与强大的 ChatGPT 交谈、访问论坛并哭泣。
我也遇到同样的问题,请问你找到解决办法了吗?
谢谢