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.

issue with progaurd minifyEnabled

See original GitHub issue

Hello,

First of all, thank you guys for awesome work. Currently, I am using grpc on my android app and it crashes with below trace when minifyEnabled is true in gradle configuration. Is there any specific progaurd rule/ config for this ?

E: io.grpc.ManagedChannelProvider$ProviderNotFoundException: No functional channel service provider found. Try adding a dependency on the grpc-okhttp or grpc-netty artifact
       at io.grpc.ManagedChannelProvider.provider(ManagedChannelProvider.java:127)
       at io.grpc.ManagedChannelBuilder.forAddress(ManagedChannelBuilder.java:45)
       at com.nishant.starterkit.helloWorld.HelloWorldActivity$GrpcTask.doInBackground(HelloWorldActivity.java:78)
       at com.nishant.starterkit.helloWorld.HelloWorldActivity$GrpcTask.doInBackground(HelloWorldActivity.java:62)
       at android.os.AsyncTask$2.call(AsyncTask.java:292)
       at java.util.concurrent.FutureTask.run(FutureTask.java:237)
       at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
       at java.lang.Thread.run(Thread.java:818)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
KrishHaricommented, May 17, 2017

@xuguobiao Did you get any solution to the java.lang.NoClassDefFoundError: io.grpc.ManagedChannelBuilder error ?

0reactions
xuguobiaocommented, Nov 28, 2016

@ @Nishant-Pathak I’ve added -keep class io.grpc.** {*;} before release, it works fine on all of my own android devices, but still receive the logs above from some android devices.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is minifyEnabled is false in release builds by default?
If minifyEnabled is set to true by default and the developer forgets to add proguard rules, it can lead to runtime crashes.
Read more >
Shrink, obfuscate, and optimize your app - Android Developers
When you build your project using Android Gradle plugin 3.4.0 or higher, the plugin no longer uses ProGuard to perform compile-time code optimization....
Read more >
Issues in release build when minifyEnabled is set to true #739
It's probably related to minifyEnabled enabling proguard, which obfuscates the code and that can make the plugin execution code not work.
Read more >
minifyEnabled=true for debug buildType don't work after AGP ...
Hi, I updated AGP to the latest version and found that minifyEnabled flag stopped working for debug buildType.
Read more >
Android MinifyEnabled, Obfuscation and Shrink | by Burak iren
Specifies not to shrink the input. By default, ProGuard shrinks the code: it removes all unused classes and class members. It only keeps...
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