Fadi Obaji Fadi Obaji - 4 months ago 294
Android Question

Android Studio & ProGuard: cannot resolve symbol getDefaultProguardFile?

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)

build.gradle screenshot

How to fix this and achieve ProGuard protection to my App ?

Answer

Try to change into -

proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'