Open
Description
What version of gRPC-Java are you using?
1.69.0
What is your environment?
MacOS Sequoia 15.0.1
javac 23.0.1
Android Studio Ladybug Feature Drop | 2024.2.2
What did you expect to see?
Working hello world project on Android
What did you see instead?
Building client app fails with
> Task :app:dexBuilderDebug FAILED
ERROR:/Users/haluzpav/git/grpc-java/examples/android/helloworld/app/build/intermediates/javac/debug/classes/io/grpc/helloworldexample/HelloworldActivity$1.class: D8: java.lang.NullPointerException: Cannot invoke "String.length()" because "<parameter1>" is null
ERROR:/Users/haluzpav/git/grpc-java/examples/android/helloworld/app/build/intermediates/javac/debug/classes/io/grpc/examples/helloworld/GreeterGrpc$GreeterStub.class: D8: java.lang.NullPointerException: Cannot invoke "String.length()" because "<parameter1>" is null
ERROR:/Users/haluzpav/git/grpc-java/examples/android/helloworld/app/build/intermediates/javac/debug/classes/io/grpc/helloworldexample/HelloworldActivity$GrpcTask.class: D8: java.lang.NullPointerException: Cannot invoke "String.length()" because "<parameter1>" is null
Full log: error.log
Steps to reproduce the bug
- https://grpc.io/docs/platforms/android/java/quickstart/#run-the-example
- Which fails, as described in Android Hello World app requires
android.useAndroidX=true
#11835 - Add
android.useAndroidX=true
into.../helloworld/gradle.properties
, as described in the error of the linked issue - Get another error, see above