问题描述
我的发布版本因这些日志而失败。
不确定这里发生了什么。可能与 Android R8 或 Gradle 4.1.0
有关。
我试过删除 node_modules
.gradle
app/build
build
我试图清理,重建,使缓存无效并重新启动。它们似乎都不起作用。
我非常感谢您的帮助。
> Task :app:minifyReleaseProductionWithR8 Failed
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.7/userguide/command_line_interface.html#sec:command_line_warnings
991 actionable tasks: 10 executed,981 up-to-date
myapp/android/app/build/intermediates/compile_and_runtime_not_namespaced_r_class_jar/releaseProduction/R.jar: R8: Type androidx.transition.R is defined multiple times: myapp/android/app/build/intermediates/compile_and_runtime_not_namespaced_r_class_jar/releaseProduction/R.jar:androidx/transition/R.class,myapp/android/app/build/intermediates/javac/releaseProduction/classes/androidx/transition/R.class
FAILURE: Build Failed with an exception.
* What went wrong:
Execution Failed for task ':app:minifyReleaseProductionWithR8'.
> com.android.tools.r8.CompilationFailedException: Compilation Failed to complete,origin: myapp/android/app/build/intermediates/compile_and_runtime_not_namespaced_r_class_jar/releaseProduction/R.jar:androidx/transition/R.class
* 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 1m 9s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command Failed: ./gradlew app:installreleaseProduction -PreactNativeDevServerPort=8081
myapp/android/app/build/intermediates/compile_and_runtime_not_namespaced_r_class_jar/releaseProduction/R.jar: R8: Type androidx.transition.R is defined multiple times: myapp/android/app/build/intermediates/compile_and_runtime_not_namespaced_r_class_jar/releaseProduction/R.jar:androidx/transition/R.class,origin: myapp/android/app/build/intermediates/compile_and_runtime_not_namespaced_r_class_jar/releaseProduction/R.jar:androidx/transition/R.class
* 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 1m 9s
at makeError (myapp/node_modules/execa/index.js:174:9)
at myapp/node_modules/execa/index.js:278:16
at processticksAndRejections (internal/process/task_queues.js:97:5)
at async runOnAllDevices (myapp/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:94:5)
at async Command.handleAction (myapp/node_modules/@react-native-community/cli/build/index.js:186:9)
info Run CLI with --verbose flag for more details.
error Command Failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command Failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)