java - Android studio error (17, 0) could not find method maven() -


project gradle

// top-level build file can add configuration options common sub-projects/modules. buildscript {     // ...     dependencies {         // ...         classpath 'com.google.gms:google-services:3.1.0' // google-services plugin     }     repositories {         google()     } }  allprojects {     // ...     dependencies {         // ...         maven {             url "https://maven.google.com" // google's maven repository         }     } } 

module gradle

apply plugin: 'com.android.application'  android {     compilesdkversion 23     buildtoolsversion '26.0.0'      defaultconfig {         applicationid "com.example.example"         minsdkversion 19         targetsdkversion 23      }       splits {         abi {             enable true             reset()             include 'x86', 'armeabi-v7a'             universalapk true         }     }      buildtypes {         release {             minifyenabled false             proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.txt'         }     } }  dependencies {     compile 'com.google.firebase:firebase-core:11.2.2'     compile project(':ratemyapp')     compile files('libs/android-async-http-1.4.6.jar')     compile files('libs/com-uvxghdmx-ucuwreks167365.jar')     compile files('libs/org.apache.http.legacy.jar')     compile files('libs/universal-image-loader-1.9.3.jar')     compile 'com.android.support:support-v4:23.4.0'     compile 'com.android.support:recyclerview-v7:23.4.0'     compile 'com.android.support:appcompat-v7:23.4.0'     compile 'com.android.support:design:23.4.0'     compile 'com.balysv:material-ripple:1.0.2'     compile 'com.google.android.gms:play-services-ads:11.2.2' } apply plugin: 'com.google.gms.google-services' 

getting error

error:(17, 0) not find method maven() arguments [build_2rpdxydj6arlyq4m2v87kde3g$_run_closure1$_closure2$_closure3@70ca8e63] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.defaultdependencyhandler. 

please me...

you can work 1 around adding mavencentral() repositories, add code repositories below mavencentral() line, , resync:

allprojects {     repositories {         jcenter()         mavencentral()         maven {             url "https://maven.google.com" // google's maven repository         }     } } 

this should remove conflict sync.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -