【发布时间】:2016-09-02 09:05:18
【问题描述】:
我正在开发一个应用程序。在我的应用程序中,代码没有错误,但是当我尝试运行我的项目时,它会出现以下错误。
错误:(1, 1) 评估项目 ':app' 时出现问题。
无法应用插件 [id 'com.android.application']
无法创建“AppPlugin”类型的插件。
我也试试这个Gradle is issuing an error "Could not create plugin of type 'AppPlugin'"
这也是Gradle errors in Android Studio
以下是我的 build.gradle 文件
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 23
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.praval.healthfreak"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.1'
compile 'com.google.android.gms:play-services:8.3.0'
compile 'de.hdodenhof:circleimageview:1.3.0'
compile 'com.android.support:design:23.2.1'
compile files('libs/YouTubeAndroidPlayerApi.jar')
}
【问题讨论】:
-
你的 gradle (wrapper) 版本是什么?你的 android gradle 插件版本是多少?
-
如何找到 gradle 版本? @DavidMedenjak
-
@PravalSharma 检查项目文件夹的
build.gradle文件。 -
@Kunu 我已经发布了
build.gradle文件 -
@PravalSharma 这是
app模块的 gradle 文件。整个项目在父文件夹中还有其他 gradle 文件。
标签: android android-gradle-plugin