I am new in android and working on an old Android project. It has a Google Places Autocomplete feature which is not working currently as Place SDK for Android it used is deprecated currently. without this everything is working fine but when i am trying to add this places sdk implementation 'com.google.android.libraries.places:places:1.0.0' for auto complete place feature then gradle sync successfully but when try to run the app then it shows error on all xml files as resource linking fails or duplicate value for resource 'attr/font' with config ' etc etc. My question how I can use this sdk without disturbing others. Below is my App level Gradle file
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
//buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.example.myappo"
minSdkVersion 16
targetSdkVersion 25
versionCode 27
versionName "1.5"
manifestPlaceholders = [HOCKEYAPP_APP_ID: "51a9c4471559421b8d53a07cbb3e3fa0"]
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
lintOptions { checkReleaseBuilds false }
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets { main { assets.srcDirs = ['src/main/assets', 'src/main/assets/'] } }
dexOptions {
javaMaxHeapSize "4g"
preDexLibraries = false
//incremental true
}
repositories {
jcenter()
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
useLibrary 'org.apache.http.legacy'
}
allprojects {
repositories {
google()
}
repositories {
maven {
url 'https://maven.google.com'
}
}
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
}
dependencies {
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:appcompat-v7:25.3.1'
implementation 'com.android.support:design:25.1.0'
implementation 'com.google.maps.android:android-maps-utils:0.4'
implementation 'com.google.android.gms:play-services:10.0.1'
implementation 'com.android.support:multidex:1.0.1'
implementation 'com.hbb20:ccp:1.7.2'
implementation 'de.hdodenhof:circleimageview:2.1.0'
implementation 'net.hockeyapp.android:HockeySDK:4.1.3'
implementation 'com.android.support:recyclerview-v7:25.1.1'
implementation 'com.android.support:cardview-v7:25.1.1'
implementation 'com.android.volley:volley:1.0.0'
implementation 'com.facebook.android:facebook-android-sdk:4.0.0'
implementation 'com.google.firebase:firebase-messaging:9.6.0'
implementation 'com.google.code.gson:gson:2.7'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.github.krtkush:LinearTimer:v2.1.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.github.bumptech.glide:glide:3.6.1'
implementation 'com.iarcuschin:simpleratingbar:0.1.5'
implementation 'com.paypal.sdk:paypal-android-sdk:2.15.3'
testImplementation 'junit:junit:4.12'
implementation 'com.google.android.libraries.places:places:1.0.0' // this is creating problem
}
apply plugin: 'com.google.gms.google-services'
And this is Project level Gradle file
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
maven { url 'https://maven.google.com' }
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath 'com.google.gms:google-services:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven { url 'https://maven.google.com' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
remove bracket from this implementation ("com.google.android.libraries.places:places:1.0.0")
Migrate your project to Android X which is the best solution to prevent the dependency conflict
Migrate to AndroidX
Related
Everything was working fine. In my application, I was using Picasso to show images and by default Picasso rotate images by 90 degrees. I wanted to replace with Glide, I tried including Glide in the project. Since then I'm getting this error even though I removed Glide from my project I can't build my project anymore. Here are my Gradles.
Project.gradle
buildscript {
repositories {
google()
maven {
url "https://maven.google.com"
}
maven {
url 'https://maven.fabric.io/public'
}
jcenter()
}
dependencies {
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.android.tools.build:gradle:3.4.2'
classpath 'com.google.gms:google-services:4.2.0'
classpath 'io.fabric.tools:gradle:1.31.0'
}
}
allprojects {
repositories {
google()
maven { url "https://maven.google.com" }
maven { url "https://jitpack.io" }
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
App.gradle
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'io.fabric'
android {
compileSdkVersion 28
defaultConfig {
applicationId "xxx"
minSdkVersion 21
targetSdkVersion 28
versionCode 40
versionName "0.0.97"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions
{
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
dexOptions {
javaMaxHeapSize "8g"
}
useLibrary 'org.apache.http.legacy'
}
repositories {
maven { url "https://jitpack.io" }
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.firebase:firebase-messaging:19.0.1'
implementation 'com.google.firebase:firebase-inappmessaging-display:18.0.1'
implementation 'com.google.firebase:firebase-dynamic-links:18.0.0'
implementation 'com.mcxiaoke.volley:library:1.0.19'
implementation 'gun0912.ted:tedpermission:2.2.2'
implementation 'com.google.android.material:material:1.0.0'
implementation 'com.github.BlacKCaT27:CurrencyEditText:2.0.2'
implementation 'com.github.CardinalNow:Android-CircleProgressIndicator:v0.2'
implementation 'com.txusballesteros:FitChart:1.0'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.google.firebase:firebase-core:17.0.1'
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
Please help.
Try this:
Go To File >> Invalidate caches and restart.
If it doesn't help, then try that manually like this:
Close Android Studio
Go to C:\Users\UserName\.android and rename:
build-cache folder to build-cache.bak
Go to C:\Users\UserName\.AndroidStudio3.4.2\system and rename these folders:
caches to caches.bak
compiler to compiler.bak
compile-server to compile-server.bak
conversion to conversion.bak
external_build_system to external_build_system.bak
frameworks to frameworks.bak
gradle to gradle.bak
resource_folder_cache to resource_folder_cache.bak
Open the Android Studio and open your project again. Hope it helps.
1- Add this
android {
defaultConfig {
multiDexEnabled true
}
}
sync project
Clean
build
Try adding these two dependencies and let me know,
implementation "android.arch.core:runtime:1.1.0"
implementation "android.arch.core:common:1.1.0"
I have updated an outdated project and made changes to build gradle, basically upgraded some gradle dependencies and changed gradle version. Project build successfully when I do clean and rebuild. But, when I try to run it on device or emulator it fails to build with transformDexArchiveWithExternalLibsDexMergerForDebug error.
I have tried almost every solution from these two SO threads but still unable to make it work.
Unable to Merge Dex - Android Studio 3.0
Unable to merge dex
Below is my project level gradle.
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
// classpath 'com.github.dcendents:android-maven-plugin:1.2'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
classpath 'com.google.gms:google-services:3.2.1'
}
}
allprojects {
repositories {
jcenter()
google()
}
}
dependencies {
}
ext {
libraryVersion = "1.0.8"
}
This is app module gradle.
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
applicationId "com.dapp.myapp"
minSdkVersion 16
targetSdkVersion 28
multiDexEnabled true
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/notice.txt'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
aaptOptions {
cruncherEnabled = false
useNewCruncher = false
}
lintOptions {
disable 'MissingTranslation'
}
dexOptions {
jumboMode true
javaMaxHeapSize "4g"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation project(':maskedEditText')
implementation project(':aPV')
//implementation files('libs/libGoogleAnalyticsServices.jar')
//compile 'com.android.support:appcompat-v7:19.1.0'
implementation files('libs/simple-xml-2.7.1.jar')
implementation project(':segmentControl')
implementation files('libs/gcm.jar')
implementation project(':UpPlatformSdk')
implementation files('libs/scribe-1.3.7.jar')
implementation files('libs/signpost-commonshttp4-1.2.1.2.jar')
implementation files('libs/signpost-core-1.2.1.2.jar')
// compile 'com.github.PhilJay:MPAndroidChart:v2.1.0'
implementation files('libs/joda-time-2.0.jar')
implementation project(':MPChartLib')
implementation files('libs/apache-httpcomponents-httpclient.jar')
implementation files('libs/apache-httpcomponents-httpcore.jar')
/*compile 'com.google.android.gms:play-services:8.4.0'*/
implementation files('libs/libphonenumber-3.8.jar')
implementation files('libs/ebizcharge-sdk.jar')
//compile project(':slicepaymentlibrary')
//compile project(':camerafragment')
implementation project(':camerafragment')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.loopj.android:android-async-http:1.4.5'
implementation 'com.android.support:customtabs:28.0.0'
//implementation 'com.google.android.gms:play-services-identity:16.0.0'
implementation 'com.google.android.gms:play-services-gcm:16.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
}
Build log
Full error stacktrace as pasting here is exceeding character limit
https://pastebin.com/Zukca8FM
Any help appreciated. Thanks.
Update your Google Services dependency:
classpath 'com.google.gms:google-services:3.3.0'
Firebase versioning style has changed, which can cause issues caused by conflicting libraries.
Try this project level gradle, I faced the same issue in my app, but this resolve my issue
buildscript {
repositories {
maven {
url 'http://jcenter.bintray.com'
name 'Google'
}
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
classpath 'com.google.gms:google-services:3.2.1'
classpath 'de.mobilej.unmock:UnMockPlugin:0.1.0'
classpath 'org.aspectj:aspectjtools:1.8.9'
classpath 'com.hujiang.aspectjx:gradle-android-plugin-aspectjx:1.0.10'
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.5"
classpath 'com.dicedmelon.gradle:jacoco-android:0.1.1'
classpath "com.archinamon:android-gradle-aspectj:3.2.0"
classpath 'com.android.tools.build:gradle:3.0.0-alpha1'
classpath 'com.jakewharton:butterknife-gradle-plugin:8.6.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
It's frustrating when you do all what the Android Studio suggests and still get errors with not enough of what to do. I'm revisiting a project and running on Android Studio 3.3 beta 1. After applying the suggested updates, the app gradle file looks like this:
apply plugin:'com.android.application'
android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
testOptions {
unitTests.returnDefaultValues = true
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:support-vector-drawable:28.0.0'
implementation 'com.android.support:gridlayout-v7:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:support-annotations:28.0.0'
implementation 'com.github.bumptech.glide:glide:4.4.0'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation "com.google.android.gms:play-services-gcm:16.0.0"
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.android.gms:play-services-places:16.0.0'
testImplementation 'junit:junit:4.12'
implementation 'com.google.android.apps.muzei:muzei-api:2.0'
}
apply plugin: 'com.google.gms.google-services'
When I go to SDK Manager, everything is installed:
And in the gradle.build:
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.0-alpha01'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:3.3.0'
}
}
What should I do? any suggestions are appreciated.
You are missing part of your top-level build.gradle file. It should resemble:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
In particular, you are missing the allprojects closure, which sets the repositories for dependency resolution in each of the modules. As a result, your module's build.gradle file does not know where to look for those dependencies.
I am using Android Studio 3.1.3. Gradle build sync failed. I used following method but there is no use of it. If there is any solution please tell me
maven { url "https://maven.google.com" }
Invalidate restart & caches
multiDexEnabled true
Adding mavenLocal() and mavenCentral()
This is module level build.gradle file:
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.developers.a_g.designapp"
minSdkVersion 15
targetSdkVersion 27
buildToolsVersion '27.1.1'
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree( dir: 'libs',include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:design-v7:27.1.1'
implementation 'com.rengwuxian.materialedittext:library:2.1.4'
implementation 'com.szagurskii:patternedtextwatcher:0.5.0'
implementation 'com.github.d-max:spots-dialog:0.7#aar'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
}
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.developers.a_g.designapp"
minSdkVersion 15
targetSdkVersion 27
buildToolsVersion '27.1.1'
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree( dir: 'libs',include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:design-v7:27.1.1'
implementation 'com.rengwuxian.materialedittext:library:2.1.4'
implementation 'com.szagurskii:patternedtextwatcher:0.5.0'
implementation 'com.github.d-max:spots-dialog:0.7#aar'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
}
This is project level build.gradle file:
buildscript {
repositories {
jcenter()
google()
maven {
url "https://maven.google.com"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
First make sure that you using:
targetSdkVersion 27
compileSdkVersion 27
buildToolsVersion '27.0.3'
And your gradle be like:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
//..
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
//..
}
}
And also update design implementation like below:
implementation 'com.android.support:design:27.1.1'
You get this error because com.android.support:design-v7 does not exist it exist without -v7, also you can check support libraries in this link any time to make sure you are using the correct library.
You should add google() repository to your dependencies
allprojects {
repositories {
google()
jcenter()
}
}
Don't
implementation 'com.android.support:design-v7:27.1.1'
buildToolsVersion '27.1.1'
Do
implementation 'com.android.support:design:27.1.1'
buildToolsVersion '27.0.3'
Make sure, you added below
allprojects {
repositories {
google()
jcenter()
maven { url 'https://maven.google.com/' }
}
}
Then Clean-Rebuild-Build.
Add the maven URL in all projects section as well and sync the gradle or try removing one by one external libraries and sync the gradle hope it helps
allprojects { repositories { google() jcenter()maven :"http://www.google.com" } }
this is the correct form
implementation 'com.android.support:design:27.1.1'
Upgrade to Android Studio 3.3 destroyed all my projects.
This was one of the problems today I ran into. And after wasting too much time to find a solution, here is the working gradle. By the time I fixed this, I had forgotten what actually I was working on. I really wonder why Google always ship their Android Studio with broken gradle files. Seems like Google engineers even themselves don't know how to write proper gradle, and nobody QAs Android Studio before its final release.
Module level gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.journaldev.okhttp"
minSdkVersion 25
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:design:27.1.1'
testImplementation 'junit:junit:4.12'
implementation 'com.squareup.okhttp3:logging-interceptor:3.4.1'
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
}
And the project level gradle:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven { url 'https://maven.google.com/' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I am getting these errors while building the project
Failed to resolve: firebase-core
Failed to resolve: multidex
Failed to resolve: play-services-ads
Failed to resolve: play-services-auth
Failed to resolve: firebase-auth-license
Failed to resolve: common
Please check and let me know how this issue can be resolved?
plugins {
id 'com.onesignal.androidsdk.onesignal-gradle-plugin' version '0.8.1'
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "com.test.android"
minSdkVersion 15
targetSdkVersion 26
versionCode 3
versionName "1.0.2"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
multiDexEnabled true
manifestPlaceholders = [onesignal_app_id : "65f11821-8462-4ec4-9e41-XXXXXXXX",
// Project number pulled from dashboard, local value is ignored.
onesignal_google_project_number: "91629XXXXX00"]
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
targetCompatibility 1.8
sourceCompatibility 1.8
}
}
dependencies {
implementation 'com.google.firebase:firebase-auth:11.6.0'
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
// applovin
implementation project(':unity-ads')
//unity ads
//compile 'com.google.android.gms:play-services-ads:11.0.4'
implementation 'com.android.support:appcompat-v7:26.+'
implementation 'com.android.support:design:26.+'
implementation 'com.android.support:support-vector-drawable:26.+'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:support-v4:26.+'
implementation 'com.google.android.gms:play-services:11.6.0'
implementation 'com.android.support:multidex:1.0.1'
//compile 'com.github.cooltechworks:ScratchView:v1.1'//not used
implementation 'com.jackpocket:scratchoff:1.1.0'
implementation 'com.adcolony:sdk:3.2.1'
implementation 'com.android.support:support-annotations:26.0.1'
implementation 'com.google.android.gms:play-services-ads:11.6.0'
implementation 'com.android.support:cardview-v7:26.1.0'
implementation 'com.facebook.android:facebook-share:[4,5)'
testImplementation 'junit:junit:4.12'
implementation 'com.ironsource.sdk:mediationsdk:6.7.0.1#jar'
//compile 'com.google.ads.mediation:unity:2.1.1.0' //not used
implementation 'com.google.firebase:firebase-database:11.6.0'
implementation 'com.github.bumptech.glide:glide:4.1.1'
implementation 'commons-net:commons-net:3.3'
//get server time
//compile 'com.github.instacart.truetime-android:library-extension-rx:2.0'
//compile 'com.github.instacart.truetime-android:library:2.0' // not used
implementation 'com.google.firebase:firebase-auth:11.6.0'
implementation 'com.google.firebase:firebase-core:11.6.0'
implementation 'com.google.android.gms:play-services-auth:11.6.0'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.onesignal:OneSignal:[3.7.1, 3.99.99]'
implementation files('libs/applovin-sdk-7.7.0-javadoc.jar')
implementation files('libs/applovin-sdk-7.7.0.jar')
}
apply plugin: 'com.google.gms.google-services'
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0-alpha09'
classpath 'com.google.gms:google-services:3.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven { url "https://maven.google.com" }
maven { url "https://jitpack.io" }
maven { url "https://adcolony.bintray.com/AdColony" }
maven { url "https://dl.bintray.com/ironsource-mobile/android-sdk" }
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Apparently, jcenter has started mirroring Google's repo. Try moving google() before jcenter() in the allprojects section of your project's build.gradle (like this):
repositories {
google()
jcenter()
maven { url "https://maven.google.com" }
maven { url "https://jitpack.io" }
maven { url "https://adcolony.bintray.com/AdColony" }
maven { url "https://dl.bintray.com/ironsource-mobile/android-sdk" }
}
Have you tried rebuilding the app? Also make sure you are using the latest version of GMS. As a sidenote you dont need to add the entire gms library, you can add selective services. I see you have added gms- and gms-ads, which would already be included in the main gms.