Obfuscation of OssLicensesActivity disables using navigation graph to navigate to it [oss-licenses-plugin]
See original GitHub issueDescribe the bug As navigation to OssLicensesActivity using good old startActivity with an Intent works as a charm, using Navigation Graph to achieve the same goal seems counterproductive because of the obfuscation (I suppose).
To Reproduce
- Configure Open Source Notices as in the docs
- Instead of using startActivity, use `navController.navigate(YourFragment.navigateToOssLicensesActivity()) with properly prepead navigation graph xml
Expected behavior I guess If it wasn’t for obfuscation, the activity should have been started.
Desktop:
- Gradle version: [3.5.3]
- Android Studio version [3.6.1 (stable)]:
- Plugin name and version: com.google.android.gms:play-services-oss-licenses:17.0.0 com.google.android.gms:oss-licenses-plugin:0.10.2
Additional context Stacktrace:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.xxx.yyy.dev/com.google.android.gms.oss.licenses.OssLicensesActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.google.android.gms.internal.oss_licenses.zzc.toString()' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2913) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6669) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.google.android.gms.internal.oss_licenses.zzc.toString()' on a null object reference at com.google.android.gms.oss.licenses.OssLicensesActivity.onCreate(Unknown Source:11) at android.app.Activity.performCreate(Activity.java:7136) at android.app.Activity.performCreate(Activity.java:7127) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6669) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) E/GmsClient: unable to connect to service: com.google.android.gms.oss.licenses.service.START on com.google.android.gms
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:7
Top GitHub Comments
Interestingly we only see this crash on Nexus 5x devices with Android 8.1.0.
Any updates here? Looks like we also see it only on Nexus 5x and 8.1.0.