简体   繁体   中英

The project is using an unsupported version of the Android Gradle plugin (0.7.3)

I tried importing one of my old project(written in Windows) to Android Studio (Now mac).

However, I get following error from Gradle:

Gradle project sync failed. Basic functionality (eg editing, debugging) will not work properly.

On the event log it says:

Error:The project is using an unsupported version of the Android Gradle plug-in (0.7.3).

Version 0.9.0 introduced incompatible changes in the build language. Please read the migration guide to learn how to update your project. Open migration guide, fix plug-in version and re-import project

Here is my build.gradle:

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.7.3'
    }
}
apply plugin: 'android'

repositories {
    mavenCentral()
}

android {
    compileSdkVersion 19
    buildToolsVersion "19.0.0"

    defaultConfig {
        minSdkVersion 9
        targetSdkVersion 16
    }
    buildTypes {
        release {
            runProguard true
            proguardFile getDefaultProguardFile('proguard-android.txt')
        }
    }
}

dependencies {
    compile 'com.android.support:appcompat-v7:+'
    compile 'com.google.android.gms:play-services:4.0.30'
    compile 'com.android.support:support-v4:18.0.0'
}

Can anybody point the probable solution?

What the error message says it that your version of Android Studio requires a newer version of the Gradle Android plugin than 0.7.3 (see buildscript block). Bump it to 0.9.0 and try to import the project again.

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