Error: (16, 0) Could not find android () method for arguments

I got this error 16.0 in pdf viewer app when I try to open it in android studio https://github.com/barteksc/AndroidPdfViewer

 buildscript {
 repositories {
    jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:2.2.3'
    classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
    classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
}
 }
 allprojects {
repositories {
    jcenter()
}
 }
 android {
     compileSdkVersion 15
    buildToolsVersion '21.1.2'
 }
+4
source share
1 answer

There are two build.gradle files for a project with one module — one project level and another application level. It looks like you mixed up both.

Move the android block to the build.gradle file at the application level, and also remember to enable minSdkVersion and targetSdkVersion

+2
source

Source: https://habr.com/ru/post/1687181/


All Articles