Could Not Find Method Android() for Arguments

Could not find method android() for arguments in Android Studio project

You are using the wrong build.gradle file.

In your top-level file, you can't define an android block.

Just move this part inside the module/build.Gradle file.

android {
compileSdkVersion 17
buildToolsVersion '23.0.0'
}
dependencies {
compile files('app/libs/junit-4.12-JavaDoc.jar')
}
apply plugin: 'maven'

Android Studio error Could not find method android() for arguments on module project

This is because you have the following code in your SendBird build.gradle:

apply plugin: 'com.android.library'
apply plugin: 'com.android.application'

You only need the following:

apply plugin: 'com.android.library'

don't forget to move it as the first line of your SendBird build.gradle. And you also need to remove this from it:

    applicationId "com.sendbird.android.sample"

because you can't have applicationId for a library module.

Gradle sync failed: Could not find method android() for arguments on root project on android studio

You are using the wrong build.gradle file.

You can't define the android block in the top-level file.

You have to remove this part in your

android {
compileSdkVersion 19
buildToolsVersion '25.0.2'
dexOptions {
incremental true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_6
targetCompatibility JavaVersion.VERSION_1_6
}
}
dependencies {compile files('app/libs/junit-4.12-JavaDoc.jar')
}
apply plugin: 'maven'

Could not find method buildscripts() for arguments

In your Gradle file, all buildscript {} blocks must appear before any plugins {} blocks in the script. So your file should look like this:

buildscripts { // Added on top of the file.
repositories {
google()
}
dependancies {
classpath 'com.google.gms:google-services:4.3.10'
}
}

plugins {
id 'com.android.application' version '7.1.2' apply false
id 'com.android.library' version '7.1.2' apply false
}

task clean(type: Delete) {
delete rootProject.buildDir
}

allprojects {
repositories {
google()
}
}

Could not find method android() for arguments in flutter

Change this (inside repositories):

 Maven { url 'https://maven.fabric.io/public' }

into this:

 maven { url 'https://maven.fabric.io/public' }

The maven() method contains lowercase m



Related Topics



Leave a reply



Submit