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
Setresult Does Not Work When Back Button Pressed
How to Get Multiple Icons to Launch Different Activities in One Application
Android Cannot Pass Intent Extras Though Alarmmanager
Android Keyboard Hides Edittext
How to Send File Using Bluetooth on Android Programatically
Create Clickable Link in Text View in Android
How to Add Action Bar from Support Library into Preferenceactivity
Android: How to Check If a Particular Accessibilityservice Is Enabled
What Is the Meaning of Addtobackstack with Null Parameter
Android: Crop an Image After Taking It with Camera with a Fixed Aspect Ratio
Extract Code Country from Phone Number [Libphonenumber]
Android: Tabhost Without Tabactivity
Using Listview:How to Add a Header View
Theme/Style Is Not Applied When Inflater Used with Applicationcontext
Importing Module in Android Studio
How to Detect Power Connected State
How to Start Power Manager of All Android Manufactures to Enable Background and Push Notification