Firebase Google Login Will Not Work (Android)

So, I initially tried to add Firehase Authentication Google Sign-in to my application. When this did not work, I decided to just try the official Quickstart Firebase app. I downloaded it, imported it into Android Studio and followed all of their directions. It still does not work.

What will happen, I click the "Login" button, a dialog box will appear in which I select my profile, and then just nothing. Debugging, I found that the onActivityResult result.isSuccess() method returns false, and I don't know where to go from here.

Checklist of frequently suggested solutions:

  • I added the Firebase JSON file to the quick launch application (after creating a new project)

  • I provided the SHA-1 code

  • Firebase Auth / Google Repo / All This is the Latest Version

  • I clicked the β€œenable google sign” power button in the Firebase console

Device Details:

  • Android device: Samsung-SM-G530A

  • Android OS Version: 5.1.1

  • Google Play Services Version: 10.2.0

  • Firebase / Play Services SDK version: 10.2.0

My code is with them, I have not changed anything. Found here .

Edit: So, I started working fast. I think it was a problem with my SHA-1 code on firebase. Now, although I have a new problem in my application ... whenever I call FirebaseAuth, I get this error:

 error:cannot access zzbql class file for com.google.android.gms.internal.zzbql not found 

and

 Error:Execution failed for task ':app:compileFacebookDebugJavaWithJavac'. > Compilation failed; see the compiler error output for details. 

Edit 2: Okay, now it's messed up! In any xml / layout file, I look that there are all kinds of errors that classes are not created.

 java.lang.NoSuchFieldError: AppCompatTextHelper at android.support.v7.widget.AppCompatTextHelper.loadFromAttributes(AppCompatTextHelper.java:58) at android.support.v7.widget.AppCompatTextHelperV17.loadFromAttributes(AppCompatTextHelperV17.java:40) at android.support.v7.widget.AppCompatButton.<init>(AppCompatButton.java:72) at android.support.v7.widget.AppCompatButton.<init>(AppCompatButton.java:62) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.jetbrains.android.uipreview.ViewLoader.createNewInstance(ViewLoader.java:465) at org.jetbrains.android.uipreview.ViewLoader.loadClass(ViewLoader.java:172) at org.jetbrains.android.uipreview.ViewLoader.loadClass(ViewLoader.java:150) at com.android.tools.idea.rendering.LayoutlibCallbackImpl.loadClass(LayoutlibCallbackImpl.java:193) at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:333) at android.view.BridgeInflater.onCreateView(BridgeInflater.java:152) at android.view.LayoutInflater.onCreateView(LayoutInflater.java:717) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:785) at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:222) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727) at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:858) at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70) at android.view.LayoutInflater.rInflate(LayoutInflater.java:834) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821) at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:861) at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70) at android.view.LayoutInflater.rInflate(LayoutInflater.java:834) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821) at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:861) at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70) at android.view.LayoutInflater.rInflate(LayoutInflater.java:834) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821) at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:861) at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70) at android.view.LayoutInflater.rInflate(LayoutInflater.java:834) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821) at android.view.LayoutInflater.inflate(LayoutInflater.java:518) at android.view.LayoutInflater.inflate(LayoutInflater.java:397) at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:324) at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:429) at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:389) at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:548) at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:533) at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:966) at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:533) at com.android.tools.idea.rendering.RenderTask.lambda$inflate$70(RenderTask.java:659) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) 
+2
android firebase firebase-authentication
source share
3 answers
  mGoogleApiClient = new GoogleApiClient.Builder(this) .enableAutoManage(this /* FragmentActivity /, this / OnConnectionFailedListener*/) .addApi(Auth.GOOGLE_SIGN_IN_API, gso) .build(); 

Add mGoogleApiClient.connect(); at the end of a line of code.

+1
source share

The recommended direction here is to get more information on debugging the problem. Possible use:

 FirebaseDatabase.getInstance().setLogLevel(Logger.Level.DEBUβ€Œβ€‹G) 

And then look at the console output / logcat in Android studio. Here here and / or here .

There are several answers on the Internet like this that you may have seen, but without additional error information it is difficult to know if they apply in your case.

0
source share

Ok, thanks for the help.

The original solution to the problem was that my SHA-1 fingerprint was incorrect in Firebase.

My editing solution was to reduce the version of com.google.android.gms from 10.2.0 to 10.0.1

Strange, but now it works!

0
source share

All Articles