【发布时间】:2016-06-01 14:15:14
【问题描述】:
我在尝试运行应用程序时收到以下错误。我之前更新了 Android Studio。Gradle 也已在下面发布。 错误:
Error:(1, 1) A problem occurred evaluating project ':app'.
> Failed to apply plugin [id 'com.android.application']
> Could not create plugin of type 'AppPlugin'.
分级:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.example.jobinsabu.georgetravels"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
repositories {
maven { url 'https://oss.sonatype.org/content/repositories/ksoap2-android-releases' }
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.1'
compile 'com.android.support:cardview-v7:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.google.code.ksoap2-android:ksoap2-android:3.6.0'
}
【问题讨论】:
-
请检查 gradle 是否已发布
-
升级gradle版本
-
我将classpath 'com.android.tools.build:gradle:2.1.0' 添加到依赖项中。我收到以下错误:Error:(1, 0) Plugin is too old, please update到更新的版本,或将 ANDROID_DAILY_OVERRIDE 环境变量设置为“c9940005c89536c6e958c4c73fd34f3fdcb919e0”修复插件版本和同步项目
打开文件 -
尝试更新 sdk extras 和 buildtoolversions 以及你的 build.gradle