【发布时间】:2015-01-09 10:09:52
【问题描述】:
我将我的项目从 eclipse 迁移到 android studio,我收到了这个错误:
Error:(1, 0) Plugin with id 'com.android.application' not found.
我有 gradle 2.2.1 和最新版本的 Android Studio 1.0.2
我的文件:
模块应用:
apply plugin: 'com.android.application'
android {
compileSdkVersion 19
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.myapp"
minSdkVersion 14
targetSdkVersion 19
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.0'
compile 'com.google.android.gms:play-services-ads:6.5.87'
}
}
项目:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
}
allprojects {
repositories {
jcenter()
}
}
gradle 包装器属性:
#Wed Apr 10 15:27:10 PDT 2013
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
【问题讨论】:
-
奇怪。您可以发布您的
gradle/wrapper/gradle-wrapper.properties文件吗? -
将类路径
'com.android.tools.build:gradle:1.0.0'移入buildscript
标签: android gradle android-studio android-gradle-plugin