Android Studio ProGuard does not appear to run
android, android-studio, proguard
Solution
Happily, I have found a solution. The issue was that before creating the signed apk, I had modified the package name in the AndroidManifest in order to overwrite a particular build in the Google Play Store. However, this change of package name had not refactored all of the corresponding "import 'package name'.R;" lines throughout the code. Today, after re-importing the project, it would no longer build because of errors attempting to import R. Once I modified all the import lines, not only did my project build properly, but exporting the signed apk properly ran ProGuard.
I'm guessing that Android Studio was somehow caching the "import R" lines and that when ProGuard was attempting to run it did not have those cached values and then crashed. Why there was no error output for me to see, I do not know.
Problem
I switched over from Eclipse to Android Studio in the last few days and have gotten most everything working. However, when I generate a signed APK it appears as though ProGuard is never running. I am using the Generate Signed APK Wizard, selecting 'Run ProGuard' and specifying my proguard.cfg as the config file. The build process runs without errors and generates a functional apk, but that apk is 65% larger than the one generated by Eclipse. When I generate the apk through Android Studio's APK Wizard and do not select 'Run Proguard' the resulting apk is the same size as the one that should have had ProGuard run on it. No mapping.txt, seeds.txt, or usage.txt is generated anywhere in my project directory. I have tried adding ``` buildTypes { release { runProguard true proguardFile file('proguard.cfg') proguardFile getDefaultProguardFile('project-android.txt') } } ``` and variations to my build.gradle file but that has had no effect either. This is occurring on Android Studio 0.2.0, though I was seeing the same behavior on 0.1.9. I am working on Windows 7. Can anyone tell me what might be going on? I would be happy if I could find the logs ProGuard is supposed to generate.