找不到Gradle DSL方法:' android'

时间:2015-02-03 12:08:49

标签: android-studio gradle android-gradle build.gradle

我正在使用android studio并面临这个问题。请查看我的代码并提出我缺少的地方。

我认为在依赖项或插件中存在问题。

    android {
      compileSdkVersion 21
       buildToolsVersion "21.1.1"
       sourceSets {
             main {
            manifest.srcFile 'AndroidManifest.xml'
      java.srcDirs = ['src']
      resources.srcDirs = ['src']
      aidl.srcDirs = ['src']
      renderscript.srcDirs = ['src']
      res.srcDirs = ['res']
      assets.srcDirs = ['assets']
    }
    androidTest.setRoot('../test/TemplateAppTest')
    androidTest {
      java.srcDirs = ['../test/TemplateAppTest/src']
      resources.srcDirs = ['../test/TemplateAppTest/src']
      res.srcDirs = ['../test/TemplateAppTest/res']
    }
  }
defaultConfig {
    testApplicationId "com.salesforce.samples.templateapp.tests"
    testInstrumentationRunner "com.salesforce.androidsdk.util.test.JUnitReportTestRunner"
  }
  packagingOptions {
    exclude 'META-INF/LICENSE'
    exclude 'META-INF/LICENSE.txt'
    exclude 'META-INF/DEPENDENCIES'
    exclude 'META-INF/NOTICE'
  }
}

0 个答案:

没有答案