question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Obfuscation of OssLicensesActivity disables using navigation graph to navigate to it [oss-licenses-plugin]

See original GitHub issue

Describe 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

  1. Configure Open Source Notices as in the docs
  2. 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:open
  • Created 3 years ago
  • Reactions:5
  • Comments:7

github_iconTop GitHub Comments

5reactions
ubuntudroidcommented, Sep 16, 2020

Interestingly we only see this crash on Nexus 5x devices with Android 8.1.0.

4reactions
emartynovcommented, Nov 2, 2021

Any updates here? Looks like we also see it only on Nexus 5x and 8.1.0.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Navigate to a destination - Android Developers
A circular navigation graph with three destinations: A, B, and C. With each navigation action, a destination is added to the back stack....
Read more >
Using Safe Args With the Android Navigation Component
In this tutorial, you'll learn to use this component with Safe Args to pass data while navigating between screens. You'll build SafeFly, an...
Read more >
Navigation Component- The Complete Guide - Medium
Navigation Graph (New XML resource) — This is a resource that contains ... Be ready with Android Studio 3.2 or higher and enable...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found