Android Studio Could not find method runProguard() for arguments?

后端 未结 6 1624
予麋鹿
予麋鹿 2020-12-04 18:59
/Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home/bin/java \"- com.intellij.rt.execution.application.AppMain org.gradle.launcher.GradleMain --build-fil         


        
相关标签:
6条回答
  • 2020-12-04 19:21

    Instead of using runProguard in your gradle file, try using minifyEnabled. This should fix the issue. runProguard is deprecated and soon be stop working.

    NOTE - To use minifyEnabled, gradle should be updated to version 2.2 or above.

    0 讨论(0)
  • 2020-12-04 19:22

    I had the same problem after updating android studio to 1.0 RC 3. I couldn't import my project to new version. i had to create a new project and add the files to the new project from the previous project manually.

    After that I found a change in the gradle build file.

    Here is the change:

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

    Instead of "runProguard false" use "minifyEnabled false"

    0 讨论(0)
  • 2020-12-04 19:28

    don't forget to change all renderscriptSupportMode to renderscriptSupportModeEnabled !

    Also thoose who are in all your libs's project

    0 讨论(0)
  • 2020-12-04 19:30

    There is an update with Android Studio, you need to migrate your Gradle configurations : http://tools.android.com/tech-docs/new-build-system/migrating-to-1-0-0

    • Replace runProguard with minifyEnabled
    • Replace zipAlign with zipAlignEnabled
    • etc...
    0 讨论(0)
  • 2020-12-04 19:35

    Works for me (after updating to 1.0 "final"):

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

    Should to be updated too: Gradle 2.2 (or above), "SDK-Tools", Support Repository, Support Library, Play Services, etc,etc,

    0 讨论(0)
  • you need to do couple of things to migrate from 0.9 to 1.0 see http://tools.android.com/tech-docs/new-build-system/migrating-to-1-0-0

    0 讨论(0)
提交回复
热议问题