【问题标题】:Android error on running the app运行应用程序时出现 Android 错误
【发布时间】: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

标签: android plugins


【解决方案1】:

在此处检查您的成绩文件并更新类路径版本:

buildscript {
repositories {
    jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:2.1.0'

}
}

尝试更改您的类路径版本,然后更新。 确保您已连接到互联网以进行 gradle 同步。

希望对你有所帮助。

谢谢,

布夫内什

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-11-27
    • 1970-01-01
    • 2016-09-25
    • 1970-01-01
    • 1970-01-01
    • 2014-05-14
    • 2018-08-26
    • 1970-01-01
    相关资源
    最近更新 更多