Closed salismt closed 7 years ago
To my knowledge the google-services
plugin should not be doing anything that would change the responsiveness of your application. It has two main features:
google-services.json
file into string resources at compile time. firebase-core
when appropriate, but I see you already have that done manually so it would be a no-op.Given that you have many other dependencies it's hard for me to make a guess at which one is conflicting with google-services
. Could you try looking at this documentation about the plugin and seeing if anything stands out to you?
I just had the same problem with you. Just move back to 2.1.0 version and the problem will be resolved.
classpath 'com.google.gms:google-services:2.1.0'
compile 'com.google.android.gms:play-services:8.4.0'
Hi,
Do you find the solution to this issue? I also experience the same thing.
change this line in the project build.gadle
classpath 'com.google.gms:google-services:3.0.0' to classpath 'com.google.gms:google-services:2.1.0'
Hi,
If I change it to version 2.1, then I get this error when building the project: Error:Failed to resolve: com.google.android.gms:play-services-measurement:9.0.2
Beside, based on the following link: https://firebase.google.com/docs/android/setup#add_firebase_to_your_app
it is said to use version 3
Yes sorry, I do have the same problem... Cannot fix it, even with the sample apps Can you build something now? Le 6 juin 2016 14:37, "thesti2" notifications@github.com a écrit :
Hi,
If I change it to version 2.1, then I get this error when building the project: Error:Failed to resolve: com.google.android.gms:play-services-measurement:9.0.2
Beside, based on the following link: https://firebase.google.com/docs/android/setup#add_firebase_to_your_app
it is said to use version 3
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/googlesamples/google-services/issues/229#issuecomment-223946403, or mute the thread https://github.com/notifications/unsubscribe/ANbDES2LZ-48lzi72JfNX78WdtrjNAzGks5qJBSFgaJpZM4InWih .
Hi,
I still cannot fix this. This seems to happen if I open and close the application a few times in a short interval. But if I open the application again after a few hours interval, the issue does not raise.
I can still build this since I restore the version to 3. But I haven't uploaded this to production.
I have exactly the same problem.
@michgauz @thesti2 @salismt could one of you capture the output of adb logcat
while this is happening? It will likely be too large to post here, so please copy into a pastebin or similar if necessary.
@samtstern That's the point. I throught something in logcat could help me, but nothing special appear. I will post the output
Hi,
This is the logcat and anr traces file: logcat: http://pastebin.com/3KePSWHe anr traces: http://pastebin.com/C4gYgBg1
@thesti2 thanks for providing those logs! I will take a look.
I got the same problem. The app not responding and there is nothing at all in logcat. I am puzzled.
don't compile bellow line, it includes all of the google services libs. Include only the one you need. I resolve this problem in my app.
compile 'com.google.android.gms:play-services:9.0.2'
So I just have to avoid compile play service:9.0.2? wont it affect the app? will it continue to work? isn't this issue raised because we want to add play service in the first place? or is there alternative?
I mean that you should compile the play service's child library separately. For example, I want to use the following library then I added then seperately, not the play service one.
// Google Play Services
compile 'com.google.android.gms:play-services-location:9.0.2'
compile 'com.google.android.gms:play-services-analytics:9.0.2'
compile 'com.google.android.gms:play-services-maps:9.0.2'
compile 'com.google.android.gms:play-services-ads:9.0.2'
compile 'com.google.android.gms:play-services-identity:9.0.2'
compile 'com.google.android.gms:play-services-gcm:9.0.2'
compile 'com.google.android.gms:play-services-auth:9.0.2'
You can find a full list here:
https://developers.google.com/android/guides/setup#add_google_play_services_to_your_project
@all I am trying to reproduce this issue, I have not been able to replicate it yet.
@tungpg has a very good point about never using compile "com.google.android.gms:play-services:x.y.z"
when you can avoid it. This is a more general piece of advice, but going to the "split libraries" method will reduce your APK size, dex method count, and generally result in a better application.
For those of you seeing this issue: are you deploying your app on devices that do not have Google Play Services or distributing your app through channels other than the Play Store?
I have the same problem, and i need the 3.0 version for use FCM so i cant downgrade to 2.1
I am also having the same problem with the google play services v9.0.2, any help guys
@gkfillipus does this issue still occur with 9.2.1?
@kroikie Yes currently i am even using 9.2.2
Moving apply plugin: 'com.google.gms.google-services'
at the end of build.gradle
file resolved the issue for me as metioned in plugin docs
Hi, Try update your build .gradle
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
classpath 'com.google.gms:google-services:3.0.0'
}
}
Solution was to put "apply plugin: 'com.google.gms.google-services'" to the end of the build.gradle and compile 'com.google.firebase:firebase-messaging:9.x.x''" top of dependencies
dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') testCompile 'junit:junit:4.12' compile 'com.google.firebase:firebase-messaging:9.x.x' } apply plugin: 'com.google.gms.google-services'
Hello, I am still having this issue know that:
I am getting the following error: Error:Could not find com.android.gms:google-services:3.1.0. Searched in the following locations: file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/android/gms/google-services/3.1.0/google-services-3.1.0.pom file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/android/gms/google-services/3.1.0/google-services-3.1.0.jar https://jcenter.bintray.com/com/android/gms/google-services/3.1.0/google-services-3.1.0.pom https://jcenter.bintray.com/com/android/gms/google-services/3.1.0/google-services-3.1.0.jar Required by: project :
please is this issue solved, I need the answer very soon
Hi @Hiyam
Your error is because you are using this 'com.android.gms:google-services:3.1.0'
Instead of this classpath 'com.google.gms:google-services:3.0.0'
Change 'com.android.gms:google-services:3.1.0'
To classpath 'com.google.gms:google-services:3.0.0'
It could solve your problem
hello in my app if i am clicking on the google sign in button then i am getting the option to choose the account i have to sign in with but after clicking the desired option it gets load for sometime and then nothing happens i remain on the same activity can anyone solve my issue it is very important please
<?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
please help me out
@geraldokandonga sir i have tried but i got another error:
Could not find method lasspath() for arguments [com.google.gms:google-services:3.0.0] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
I want to integrate my app with Firebase SDK in my Android app to use Firebase Remote config It requires me to include apply plugin: 'com.google.gms.google-services' at the bottom of app/build.gradle however when I add it, if I reopen my app a couple times, the app would stop responding what is the plugin do in my app that might cause the app stop responding?
here is my project gradle
here is my app gradle
is plugin: 'com.google.gms.google-services' are conflicting with one of these libraries that cause the app freeze? please help