0

When I update to classpath 'com.android.tools.build:gradle:3.6.1' I run into this non-understandable error.

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

Maybe someone has a hint for me to get rid of it ?

hannes ach
  • 16,247
  • 7
  • 61
  • 84
  • 1
    Looks as if you use library `reactive-streams-flow-adapters` (with class `org.reactivestreams.FlowAdapters`) which R8 fails to process correctly. Can you explain how that is used in your code? Could you please run the `./gradlew` command with `--stacktrace` and provide the detailed output? I have opened http://issuetracker.google.com/152163747 to track this. Please follow up there. – sgjesse Mar 23 '20 at 08:57

2 Answers2

1

This turned out be be a duplicate of https://issuetracker.google.com/150325706, see https://issuetracker.google.com/150325706#comment25 for how to use a R8 version 1.6.82 with the fix.

This should be resolved in Android Studio 3.6.2 (when released).

sgjesse
  • 3,793
  • 14
  • 17
0

Yes I can confirm, this helps

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' 
    }
}

Thank you @sgjesse

hannes ach
  • 16,247
  • 7
  • 61
  • 84