title: build gradle fail with "no signature of method .... is applicable for argument types: (java.lang.String) values"
body: <p>I have 4 gradle build files: when I build in android studio I am constantly having the error: </p>
  
  <blockquote>
    <p>No signature of method:
    org.gradle.model.ModelMap.getDefaultProguardFile() is applicable for
    argument types: (java.lang.String) values: [proguard-android.txt]</p>
  </blockquote>
  
  <p><strong>file 1</strong></p>
  
  <pre><code>// Top-level build file where you can add configuration options common to all sub-projects/modules.
  
  buildscript {
      repositories {
          jcenter()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle-experimental:0.9.3'
          // NOTE: Do not place your application dependencies here; they belong
          // in the individual module build.gradle files
      }
  }
  
  allprojects {
      repositories {
          jcenter()
      }
  }
  
  task clean(type: Delete) {
      delete rootProject.buildDir
  }
  </code></pre>
  
  <p><strong>file 2</strong></p>
  
  <pre><code>apply plugin: 'com.android.model.native'
  
  model {
      android {
          compileSdkVersion = 25
          buildToolsVersion = '25.0.0'
  
          defaultConfig {
              minSdkVersion.apiLevel = 17
              targetSdkVersion.apiLevel = 25
              versionCode = 1
              versionName = '1.0'
          }
          ndk {
              moduleName = 'fpextractor'
              platformVersion = 17
              toolchain  = "clang"
              stl        = 'gnustl_static'   //std::mutex not in gnustl_static
              cppFlags.add('-std=c++11')
              abiFilters.addAll(['armeabi', 'armeabi-v7a', 'x86'])
              //abiFilters.addAll(['armeabi', 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64', 'mips', 'mips64']) //this is default
              //abiFilters.addAll(['armeabi'])
              ldLibs.addAll(['android', 'log', 'atomic', 'z'])
          }
      }
  }
  
  // This is just copy out the header file and built lib into distribution
  // directory for clint application to use; it is a small overhead of this sample:
  //    both lib and app are put inside one project space [save maintenance time]
  task(distributeLib, type : Copy) {
      // trigger build library
      dependsOn assemble
      into '../distribution/fpextractor/'
      from('src/main/jni/fp_extractor.h') {
          into 'include/'
      }
      from('build/outputs/native/release/lib') {
          into 'lib/'
      }
  }
  </code></pre>
  
  <p><strong>file 3</strong></p>
  
  <pre><code>apply plugin: 'com.android.model.native'
  
  model {
      android {
          compileSdkVersion = 25
          buildToolsVersion = '25.0.0'
  
          defaultConfig {
              minSdkVersion.apiLevel = 17
              targetSdkVersion.apiLevel = 25
              versionCode = 1
              versionName = '1.0'
          }
          ndk {
              moduleName = 'nativeaudio'
              platformVersion = 17
              toolchain  = "clang"
              stl        = 'gnustl_static'   //std::mutex not in gnustl_static
              cppFlags.add('-std=c++11')
              abiFilters.addAll(['armeabi', 'armeabi-v7a', 'x86'])
              //abiFilters.addAll(['armeabi', 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64', 'mips', 'mips64']) //this is default
              //abiFilters.addAll(['armeabi-v7a'])
              ldLibs.addAll(['android', 'log', 'OpenSLES', 'atomic'])
          }
      }
  }
  
  // This is just copy out the header file and built lib into distribution
  // directory for clint application to use; it is a small overhead of this sample:
  //    both lib and app are put inside one project space [save maintenance time]
  task(distributeLib, type : Copy) {
      // trigger build library
      dependsOn assemble
      into '../distribution/nativeaudio/'
      from('src/main/jni/buf_manager.h') {
          into 'include/'
      }
      from('src/main/jni/android_debug.h') {
          into 'include/'
      }
      from('src/main/jni/debug_utils.h') {
          into 'include/'
      }
      from('src/main/jni/audio_common.h') {
          into 'include/'
      }
      from('src/main/jni/audio_recorder.h') {
          into 'include/'
      }
      from('build/outputs/native/release/lib') {
          into 'lib/'
      }
  }
  </code></pre>
  
  <p><strong>file 4</strong></p>
  
  <pre><code>apply plugin: 'com.android.model.application'
  
  // Root of 3rd party lib(s): location could be anywhere on the host system
  def lib_distribution_root = '../distribution'
  model {
      repositories {
          libs(PrebuiltLibraries) {
              // Configure one pre-built lib: shared
              nativeaudio {
                  // Inform Android Studio where header file dir for this lib
                  headers.srcDir "${lib_distribution_root}/nativeaudio/include"
                  // Inform Android Studio where lib is -- each ABI should have a lib file
                  binaries.withType(SharedLibraryBinary) {
                      sharedLibraryFile = file("${lib_distribution_root}/nativeaudio/lib/${targetPlatform.getName()}/libnativeaudio.so")
                  }
              }
              fpextractor {
                  // Inform Android Studio where header file dir for this lib
                  headers.srcDir "${lib_distribution_root}/fpextractor/include"
                  // Inform Android Studio where lib is -- each ABI should have a lib file
                  binaries.withType(SharedLibraryBinary) {
                      sharedLibraryFile = file("${lib_distribution_root}/fpextractor/lib/${targetPlatform.getName()}/libfpextractor.so")
                  }
              }
              // Configure another pre-built lib: shared;[change to static after Studio supports]
              // static lib generation. USING static lib is supported NOW, for that case,
              // simple change:
              //  SharedLibaryBinary --&gt; StaticLibraryBinary
              //  sharedLibraryFile  --&gt; staticLibraryFile
              //  *.so --&gt; *.a
              //gperf {
              //    headers.srcDir "${lib_distribution_root}/gperf/include"
              //    binaries.withType(SharedLibraryBinary) {
              //        sharedLibraryFile = file("${lib_distribution_root}/gperf/lib/${targetPlatform.getName()}/libgperf.so")
              //    }
              //}
          }
      }
      android {
          compileSdkVersion = 25
          buildToolsVersion = '25.0.0'
  
          defaultConfig {
              applicationId='com.gfk.mediawatchapp'
              minSdkVersion.apiLevel = 17
              targetSdkVersion.apiLevel = 25
              versionCode = 22
              versionName = '255.0.4'
              // Enabling multidex support.
              //multiDexEnabled true
          }
          ndk {
              platformVersion = 17
              moduleName = 'mwlib'
              toolchain  = "clang"
              stl        = 'gnustl_static'
              cppFlags.add('-std=c++11')
              ldLibs.addAll(['android', 'log', 'OpenSLES', 'atomic'])
              //build a default combined apk including all ABIs.
              //abiFilters.addAll(['armeabi-v7a'])
              abiFilters.addAll(['armeabi', 'armeabi-v7a', 'x86']) //this is default
          }
          sources {
              main {
                  jni {
                      dependencies {
                          library 'nativeaudio' linkage 'shared'
                          library 'fpextractor' linkage 'shared'
                          // if gperf were *.a, change shared --&gt; static
                          //library 'gperf' linkage 'shared'
                      }
                  }
                  jniLibs {
                      // for shared lib, lib need to be pushed to the target too
                      // Once libs are copied into app/src/main/jniLibs directory,
                      // Android Studio will pack them into APK's lib/ directory
                      // Here we like to avoid another duplication by pointing
                      // to the files that containing our libs' distribution location
                      // so the same file is used by compiler at host, also packed
                      // into APk to be used at Target (phone/tablet)
                      source {
                          srcDir "${lib_distribution_root}/nativeaudio/lib"
                          srcDir "${lib_distribution_root}/fpextractor/lib"
                          //srcDir "${lib_distribution_root}/gperf/lib"
                      }
                  }
              }
          }
          buildTypes {
              release {
                  minifyEnabled true
                  shrinkResources true
                  proguardFiles.add(file('proguard-android.txt'))
                  proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
              }
          }
      }
  }
  
  dependencies {
      println rootProject.getName()
      compile fileTree(include: ['*.jar'], dir: 'libs')
      compile 'com.android.support:support-v4:25.3.1'
      compile 'commons-net:commons-net:3.5'
      //compile 'com.android.support:appcompat-v7:23.3.0'
      compile 'com.android.support:appcompat-v7:25.3.1'
      compile 'com.android.support:design:25.3.1'
      compile 'com.android.support:cardview-v7:25.3.1'
      compile 'com.android.support:recyclerview-v7:25.3.1'
      compile 'com.google.android.gms:play-services-appindexing:9.8.0'
      compile 'com.amazonaws:aws-android-sdk-core:2.4.2'
      compile 'com.amazonaws:aws-android-sdk-s3:2.4.2'
      compile 'com.amazonaws:aws-android-sdk-ddb:2.4.2'
      compile 'com.amazonaws:aws-android-sdk-cognitoidentityprovider:2.4.2'
  }
  
  //  Unnecessary dependency management:
  //  Make sure the libs are available when begin compiling application project
  //  This could be ignored because in real scenario, the pre-built libs are
  //  already given to us before creating application.
  tasks.whenTaskAdded { task -&gt;
      if (task.name.contains('compile')) {
          task.dependsOn ':nativeaudio:distributeLib'
          task.dependsOn ':fpextractor:distributeLib'
      }
  }
  </code></pre>
  
  <p>Please: Can anyone help me to understand why I have always the following error:</p>
  
  <blockquote>
    <p>No signature of method:
    org.gradle.model.ModelMap.getDefaultProguardFile() is applicable for
    argument types: (java.lang.String) values: [proguard-android.txt]</p>
  </blockquote>