如何解决“无法应用插件[id'com.android.application']”构建错误?

时间:2016-02-03 09:40:43

标签: android android-gradle

我正在开发一个Android应用程序。它之前正在工作。我的应用程序开始提供“构建失败”。相关的故障日志如下。什么问题可能导致这个问题。我清理并运行make app但它没有解决它。

FAILURE: Build failed with an exception.

* Where:
Build file 'C:\Software\workspace\WaterMeterReader\app\build.gradle' line: 1

* What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin [id 'com.android.application']
   > Could not create an instance of type  com.android.build.gradle.AppExtension_Decorated.

 * Try:
 Run with --stacktrace option to get the stack trace. Run with --info or --     debug option to get more log output.

BUILD FAILED

我的build.gradle文件我也如下。

    apply plugin: 'com.android.application'

    android {
        compileSdkVersion 23
       buildToolsVersion '23.0.1'
    defaultConfig {
        applicationId "com.belsoft.watermeterreader"
        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/' }
        }
    }
    productFlavors {
    }
}

    dependencies {
      compile fileTree(include: ['*.jar'], dir: 'libs')
      testCompile 'junit:junit:4.12'
      compile 'com.android.support:appcompat-v7:23.1.1'
      compile 'com.android.support:design:23.1.1'
      compile 'com.jakewharton:butterknife:7.0.1'
      compile 'com.android.support:support-v4:23.1.1'
      compile 'com.google.code.ksoap2-android:ksoap2-android:3.3.0'
      compile files('libs/Sewoo_Android_1070.jar')
  }

0 个答案:

没有答案