I'm exporting an Android application from Eclipse. Proguard thinks it is obfuscating the .apk according to the console, dump.txt, mapping.txt, seeds.txt and usage.txt output, but when I decompile the .apk itself it is not obfuscated. Names of classes and fields are intact. I have tried various different Proguard configs but there doesn't seem to be anything wrong in terms of the configs. I make sure to clean the project so the classes.dex file won't be outdated.
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
This worked for me in Eclipse Neon:
Right click on project and add the Gradle nature
File -> Export -> Android -> Generate Gradle build files
In the root directory of your project, create a local.properties file and set sdk.dir. See: Where does local.properties go for android project?
Right click on project -> Gradle -> Refresh Gradle Project
Enable code shrinking in build.gradle. See: https://developer.android.com/studio/build/shrink-code.html
Put your Proguard configuration in proguard-rules.pro (or in a different file if you set the proguardFiles property in build.gradle accordingly)
Open the Gradle Tasks view and run the assembleRelease task. Check the console to see if it ran successfully. If it went well, refresh your project directory and the .apk file(s) will be in the build/outputs/apk subdirectory.