简体   繁体   中英

Android: cannot resolve symbol getDefaultProguardFile

I have a problem with gradle. It can't find getDefaultProguardFile() method.

Here is how it looks like:

在此处输入图片说明

None of these is working:

  • clean project
  • rebuild
  • invalidate caches and restart

Does someone know what is the problem? I am working on the last version(1.5) of Android Studio.

reference google issue Just update your buildTypes instead your .

buildTypes {
        release {
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

Then Clean - Rebuild And File -> Invalidate Cache / Restart . I hope it will helps you .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM