我的项目在intelij中运行良好,我想在android studio beta中试用它,但是当导入它时,android studio说
Error:The project is using an unsupported version of Gradle. Please use version 1.10.
Please point to a supported Gradle version in the project's Gradle settings or in the project's Gradle wrapper (if applicable.)
<a href="fixGradleElements">Fix Gradle wrapper and re-import project</a><br><a href="openGradleSettings">Gradle settings</a>
这是我的build.gradle文件:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.12+'
}
}
apply plugin: 'android'
dependencies {
compile files('libs/android-support-v4.jar')
//compile files('libs/GoogleAdMobAds.jar')
compile files('libs/libGoogleAnalyticsV2')
compile files('libs/google-play-services.jar')
compile files 'com.android.support:appcompat-v7:+'
}
android {
compileSdkVersion 17
buildToolsVersion "17.0.0"
defaultConfig {
minSdkVersion 7
targetSdkVersion 16
}
}
以前在intelij我一直在使用com.android.tools.build:gradle:.5+
,我想这不再受支持了。所以我想知道我需要的正确设置是什么?建议将其更改为.12+,然后在按下建议的快速修复时导致“无法找到对Android Gradle插件的任何引用”。有什么建议吗?
答案 0 :(得分:0)
你有没有更新你的Android工作室版本?这发生在我身上,但在更新后修复了。您必须重建项目并确保已设置新的目标gradle构建。
答案 1 :(得分:0)
我通过删除所有生成的构建和gradle文件修复了这个问题... android studio然后自动下载了更新版本的gradle并且问题得到了解决。