0

I am using android studio and facing this problem.Please have look at my code and suggest where i am missing.

I think there is problem in dependancies or plugin.

    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'
  }
}
dharmendra vaishnav
  • 1,851
  • 2
  • 17
  • 23
  • http://stackoverflow.com/questions/23409384/android-studio-build-script-error-unsupported-gradle-dsl-method-found-andro and http://stackoverflow.com/questions/21881092/build-script-error-unsupported-gradle-dsl-method-found-android and http://stackoverflow.com/questions/24163573/android-studio-build-script-error-unsupported-gradle-dsl-method-found-android – Scott Barta Feb 03 '15 at 14:36
  • Are you using Android Studio? If yes then there are two gradle files that youll see one will be at the project level and the other one will be at module level. If you have added above script in the project level youll see such errors. Therefore if that is the case can you please move it to modular build.gradle file and see if it works. – Ahmed Feb 03 '15 at 15:39

0 Answers0