issue with progaurd minifyEnabled
See original GitHub issueHello,
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:
- Created 7 years ago
- Comments:6 (1 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@xuguobiao Did you get any solution to the java.lang.NoClassDefFoundError: io.grpc.ManagedChannelBuilder error ?
@ @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.