google play service location error Android - android

When I update my play-services-location to 11.0.2 I get following error.
package com.google.android.gms.maps does not exist
package com.google.android.gms.maps.model does not exist
When play-services-location was 9.0.1 it works fine. I need to integrate this app into another app where dependencies are :
compile 'com.google.firebase:firebase-appindexing:11.0.2'
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support:recyclerview-v7:24.2.1'
compile 'com.android.support:cardview-v7:24.2.1'
compile 'com.google.android.gms:play-services-auth:11.0.2'
compile 'com.google.firebase:firebase-database:11.0.2'
compile 'com.google.firebase:firebase-storage:11.0.2'
compile 'com.firebaseui:firebase-ui:2.0.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.google.firebase:firebase-auth:11.0.2'
compile 'com.theartofdev.edmodo:android-image-cropper:2.4.+'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.android.support:design:24.1.1'
compile 'de.hdodenhof:circleimageview:1.3.0'
testCompile 'junit:junit:4.12'
When I tried to set all to 9.0.1, I get following error:
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support:recyclerview-v7:24.2.1'
compile 'com.android.support:cardview-v7:24.2.1'
compile 'com.google.firebase:firebase-database:9.0.1'
compile 'com.google.firebase:firebase-storage:9.0.1'
compile 'com.firebaseui:firebase-ui:2.0.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.google.firebase:firebase-auth:9.0.1'
compile 'com.theartofdev.edmodo:android-image-cropper:2.4.+'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.android.support:design:24.1.1'
compile 'de.hdodenhof:circleimageview:1.3.0'
compile 'com.google.android.gms:play-services-location:9.0.1'
compile 'com.google.android.gms:play-services-auth:9.0.1'
compile 'com.google.firebase:firebase-appindexing:9.0.1'
Error:Failed to resolve com.google.firebase:firebase-appindexing:9.0.1
Do I need to update Google play services. Please help.

I don't see
compile 'com.google.android.gms:play-services-maps:11.0.2'
By the way, latest version is 11.4.2

Related

How to reduce apk for my app, When creating apk lib folder contains diff app engine support how to make it split?

How to reduce apk size when releasing signed apk from my app module,
I tried
In my Gradle file I have added these dependencies
compile project(':v-plus')
compile project(':android-pdf-viewer')
compile 'com.android.support:support-v4:27.0.1'
compile 'com.android.support:appcompat-v7:27.0.1'
compile 'com.android.support:design:27.0.1'
compile 'com.android.support:recyclerview-v7:27.0.1'
compile 'com.android.support:cardview-v7:27.0.1'
compile 'com.android.support:customtabs:27.0.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.android.gms:play-services-analytics:11.4.2'
compile 'com.google.android.gms:play-services-location:11.4.2'
compile 'com.google.firebase:firebase-messaging:11.4.2'
compile 'com.google.android.gms:play-services-auth:11.4.2'
compile 'com.google.firebase:firebase-core:11.4.2'
compile 'com.facebook.network.connectionclass:connectionclass:1.0.1'
compile 'com.google.code.gson:gson:2.7'
compile 'com.facebook.android:facebook-android-sdk:4.+'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'me.relex:circleindicator:1.2.2#aar'
compile 'com.firebase:firebase-jobdispatcher:0.8.4'
compile 'org.jetbrains.kotlin:kotlin-stdlib-jre7:1.1.61'
By using above and after creating release apk, the size became 28 MB, how can I fix that.

Manifest merger failed error when try to upgrade to 26.0.0-alpha1

I have these dependencies:
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
//compile 'com.android.support:mediarouter-v7:25.3.1'
compile('com.mikepenz:materialdrawer:5.8.1#aar') {
transitive = true
}
compile 'com.afollestad.material-dialogs:core:0.9.4.3'
compile 'commons-io:commons-io:2.5'
compile 'com.google.code.gson:gson:2.7'
compile 'com.sothree.slidinguppanel:library:3.1.1'
compile 'com.makeramen:roundedimageview:2.3.0'
compile 'com.google.android.gms:play-services-location:11.0.4'
compile 'com.google.android.gms:play-services-maps:11.0.4'
compile 'com.google.android.gms:play-services-ads:11.0.4'
compile 'com.google.android.gms:play-services-places:11.0.4'
compile 'com.github.ksoichiro:android-observablescrollview:1.6.0'
compile 'net.i2p.android.ext:floatingactionbutton:1.10.0'
compile 'com.lsjwzh:materialloadingprogressbar:0.5.8-RELEASE'
compile 'org.sufficientlysecure:html-textview:1.3'
compile 'com.github.mrengineer13:snackbar:1.2.0'
compile 'com.github.vajro:MaterialDesignLibrary:1.6'
compile 'com.mcxiaoke.volley:library:1.0.19'
compile 'com.github.AndroidDeveloperLB:MaterialPreferenceLibrary:5'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.jakewharton:butterknife:8.5.1'
compile 'com.nbsp:library:1.2'
compile 'io.ticofab.androidgpxparser:parser:1.0.0'
compile 'com.annimon:stream:1.1.6'
compile 'org.greenrobot:eventbus:3.0.0'
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
compile 'io.reactivex.rxjava2:rxjava:2.0.1'
compile 'com.mikepenz:weather-icons-typeface:2.0.10.2#aar'
compile 'uk.co.samuelwall:material-tap-target-prompt:1.10.0'
compile 'com.github.PhilJay:MPAndroidChart:v3.0.2'
compile 'it.sephiroth.android.library.bottomnavigation:bottom-navigation:2.0.1-rc1'
compile 'com.mikepenz:google-material-typeface:3.0.1.0.original#aar'
compile 'com.mikepenz:material-design-iconic-typeface:2.2.0.2#aar'
compile 'com.mikepenz:iconics-core:2.8.6#aar'
compile 'com.github.florent37:materialtextfield:1.0.7'
compile 'com.github.gabrielemariotti.cards:cardslib-core:2.1.0'
compile 'com.github.gabrielemariotti.cards:cardslib-cards:2.1.0'
compile 'com.github.gabrielemariotti.cards:cardslib-recyclerview:2.1.0'
compile 'com.google.firebase:firebase-auth:11.0.4'
compile 'com.google.firebase:firebase-messaging:11.0.4'
compile 'com.google.firebase:firebase-core:11.0.4'
compile 'com.google.firebase:firebase-crash:11.0.4'
compile 'com.google.firebase:firebase-database:11.0.4'
compile 'com.google.firebase:firebase-storage:11.0.4'
compile 'com.github.jkwiecien:EasyImage:1.3.1'
compile 'com.chauthai.swipereveallayout:swipe-reveal-layout:1.4.0'
compile 'com.github.jd-alexander:library:1.1.0'
testCompile 'junit:junit:4.12'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
compile('com.crashlytics.sdk.android:crashlytics:2.7.0#aar') {
transitive = true;
}
compile 'com.android.support:design:26.0.0-alpha1'
compile 'com.android.support:appcompat-v7:26.0.0-alpha1'
compile 'com.android.support:recyclerview-v7:26.0.0-alpha1'
compile 'com.android.support:support-v4:26.0.0-alpha1'
compile 'com.android.support:cardview-v7:26.0.0-alpha1'
}
for compile 'com.android.support.constraint:constraint-layout:1.0.2', I get the following error message:
Error:Execution failed for task ':app:processDebugManifest'.
Manifest merger failed : Attribute meta-data#android.support.VERSION#value value=(25.3.1) from [com.android.support:support-v13:25.3.1] AndroidManifest.xml:27:9-31
is also present at [com.android.support:design:26.0.0-alpha1] AndroidManifest.xml:27:9-38 value=(26.0.0-alpha1).
Suggestion: add 'tools:replace="android:value"' to element at AndroidManifest.xml:25:5-27:34 to override.
Any suggestion how to fix the error?
All com.android.support libraries must use the exact same version specification
I think the problem is with the com.afollestad.material-dialogs library and you have to force the library version as described here
Support Lib Update 25.3.1 Material Dialog

Firebase Authentication Failure because of Gradle?

My project seems fine, but still does not work. Am I supposed to use highest version of dependencies? Is that it? For example firebase-auth:11.2.2 instead of 10.0.1 which I used?
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.firebaseui:firebase-ui-storage:1.1.1'
compile 'com.google.firebase:firebase-database:10.0.1'
compile 'com.firebaseui:firebase-ui-database:1.1.1'
compile 'com.google.firebase:firebase-auth:10.0.1'
compile 'com.google.android.gms:play-services-auth:10.0.1'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.android.support:recyclerview-v7:25.1.0'
compile 'com.android.support:cardview-v7:25.1.0'
compile 'de.hdodenhof:circleimageview:1.3.0'
compile 'com.android.support:support-v4:25.1.0'
compile 'com.android.support:design:25.1.0'
testCompile 'junit:junit:4.12'
Your problem is that you are mixing the old dependencies with the new once. So in order to solve your problem, you need to remove all the dependencies that are old and use the latest version of the new once.
Remove this lines of code:
compile 'com.firebaseui:firebase-ui-storage:1.1.1'
compile 'com.firebaseui:firebase-ui-database:1.1.1'
compile 'com.google.firebase:firebase-database:10.0.1'
compile 'com.google.firebase:firebase-auth:10.0.1'
compile 'com.google.android.gms:play-services-auth:10.0.1'
and add only this lines:
compile 'com.google.firebase:firebase-auth:11.2.2'
compile 'com.google.firebase:firebase-database:11.2.2'
compile 'com.google.firebase:firebase-storage:11.2.2'
compile 'com.google.android.gms:play-services-auth:11.2.2'

Google oauth error

I tried to link my app with gplus it works fine in separate and not when I merged it with my project app. Please take a look at the below gradle file and help me if u can.
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:design:25.3.1'
compile 'com.squareup.retrofit2:retrofit:2.3.0'
compile 'com.squareup.retrofit2:converter-gson:2.3.0'
compile 'com.squareup.retrofit2:converter-jackson:2.1.0'
compile 'de.hdodenhof:circleimageview:1.2.1'
testCompile 'junit:junit:4.12'
compile 'com.google.android.gms:play-services-auth:9.0.2'
compile 'com.google.android.gms:play-services:9.0.2'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.android.support:multidex:1.0.1'
}
It shows the following error when i try to run:
java.lang.AbstractMethodError: abstract method "com.google.android.gms.common.api.Api$zze com.google.android.gms.common.api.Api$zza.zza(android.content.Context, android.os.Looper, com.google.android.gms.common.internal.zzf, java.lang.Object, com.google.android.gms.common.api.GoogleApiClient$ConnectionCallbacks, com.google.android.gms.common.api.GoogleApiClient$OnConnectionFailedListener)"
I was facing the same issue,
I tried with changing 'com.google.android.gms:play-services-auth:9.0.2' and 'com.google.android.gms:play-services:9.0.2' to
'com.google.android.gms:play-services-auth:9.2.0'
'com.google.android.gms:play-services:9.2.0'
Try to change the version.

Why these dependencies are getting rearranged in build.gradle ? : Android Studio

I'm using Android Studio 2.3. In my app level build gradle, I have these dependencies.
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.github.bumptech.glide:glide:3.6.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.firebase:firebase-core:10.2.4'
compile 'com.google.firebase:firebase-database:10.2.4'
compile 'com.google.firebase:firebase-storage:10.2.4'
compile 'com.google.firebase:firebase-auth:10.2.4'
compile 'com.firebaseui:firebase-ui-auth:1.2.0'
compile 'com.google.firebase:firebase-messaging:10.2.4'
compile 'com.google.android.gms:play-services-auth:10.2.4'
testCompile 'junit:junit:4.12'
Not all the time, but some times when I run my app after few modifications in my source code (Activities basically). It rearranges the order as shown below and gives me a build error in LogCat. why ?
compile
'com.android.support:appcompat-v7:25.3.1'compile
'com.android.support:design:25.3.1'compile
'com.github.bumptech.glide:glide:3.6.1'compile
'com.android.support.constraint:constraint-layout:1.0.2'compile
'com.google.firebase:firebase-core:10.2.4'compile 'com.google.firebase:firebase-database:10.2.4'
compile 'com.google.firebase:firebase-storage:10.2.4'
compile 'com.google.firebase:firebase-auth:10.2.4'
compile 'com.firebaseui:firebase-ui-auth:1.2.0'
compile 'com.google.firebase:firebase-messaging:10.2.4'
compile 'com.google.android.gms:play-services-auth:10.2.4'
testCompile 'junit:junit:4.12'
have you tried using the
compile('com.frebase..')
instead?

Categories

Resources