[英]Android Studio R8 NullPointerException
當我更新到classpath 'com.android.tools.build:gradle:3.6.1'
我遇到了這個無法理解的錯誤。
R8: The method `java.util.concurrent.Flow$Subscriber org.reactivestreams.FlowAdapters.toFlowSubscriber(org.reactivestreams.Subscriber)` does not type check and will be assumed to be unreachable.
R8: The method `java.util.concurrent.Flow$Processor org.reactivestreams.FlowAdapters.toFlowProcessor(org.reactivestreams.Processor)` does not type check and will be assumed to be unreachable.
R8: The method `java.util.concurrent.Flow$Publisher org.reactivestreams.FlowAdapters.toFlowPublisher(org.reactivestreams.Publisher)` does not type check and will be assumed to be unreachable.
> Task :MXApp:minifyAdminReleaseWithR8 FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':MXApp:minifyAdminReleaseWithR8'.
> java.lang.NullPointerException (no error message)
* 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 2m 9s
也許有人暗示我擺脫它?
結果證明這是https://issuetracker.google.com/150325706的副本,請參閱https://issuetracker.google.com/150325706#comment25了解如何使用帶有修復程序的 R8 版本 1.6.82。
這應該在 Android Studio 3.6.2(發布時)中解決。
是的,我可以確認,這有幫助
buildscript {
repositories {
maven {
url 'https://storage.googleapis.com/r8-releases/raw'
}
}
dependencies {
classpath 'com.android.tools:r8:1.6.82' // Must be before the Gradle Plugin for Android.
classpath 'com.android.tools.build:gradle:3.6.1'
}
}
謝謝@sgjesse
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.