Can't build APK with ProGuard minify enabled.
See original GitHub issueHello, I can’t build APK with this enabled:
buildTypes {
release {
debuggable false
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
//...
}
When I’m trying to build APK file, Android Studio throws this error in build output dialog: Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'.
Is there any way to fix this issue? I want to keep APK size small.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Can't build APK with Android Studio when using ProGuard ...
I have a problem generating the APKs of my applications. ... with all the dependencies. ... How do I fix it so the...
Read more >Can't build release APK with minifyEnabled #28979 - GitHub
Try adding a dependency on the support-fragment library to the build type in the Gradle script that uses minifyEnabled . For example: buildTypes ......
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 >Secure your codes by enabling Proguard in Android App
2. Just make minifyEnabled true for enable proguard. You may also enable shrinkResources and useProguard true for reducing your apk size by removing...
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 >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
Nevermind, I can now build APK. I added these lines as well:
Thank you for your help 😃
It’s still not working 😕 I guess I’ll disable ProGuard