IDE: Android Studio 1.1.0
Subject: ProGuard
Problem: ProGuard files or tools not recognized by Android Studio, getDefaultProguardFile
can not be resolved and there's no proguard-android.txt
and proguard-rules.txt
files in the app, see the image below: (from build.gradle)
How to fix this and achieve ProGuard protection to my App ?
I had the same trouble as shown here:
The error message makes it seem as if the file is not being found, and therefore not read. However, I went to into sdk/tools/proguard folder to find the file, and at the top added a statement to test if the file was actually being read. I put at the top "Will this crash it?"
As you can see from the error, the file was indeed found during the build process and the statement I added crashed it. Thus, it appears the "can't resolve symbol" error is giving a false positive.