I had an Android project built with Android Studio and trying to import and run it on my Android Studio but facing the below error when trying to Sync the project
addition to @Gabriele answer
you should change
runProguard false
to
minifyEnabled false
In my case I just used
"Menu > File > Invalidate Caches/Restart > Invalidate & Restart"
I was solved.
You have to update the:
Gradle plugin for Android
You have to change this line in build.gradle
:
classpath 'com.android.tools.build:gradle:0.9.+'
in
classpath 'com.android.tools.build:gradle:1.1.+'
Gradle Version
Change this line in gradle-wrapper.properties
distributionUrl=http\://services.gradle.org/distributions/gradle-1.10-all.zip
in
distributionUrl=http\://services.gradle.org/distributions/gradle-2.2.1-all.zip
About proguard you have to change this line in your build.gradle
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
In
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}