7

I have integrated google signin in android app but when run app I getting exception like:

android.content.ActivityNotFoundException: Unable to find explicit activity class {com.example/com.google.android.gms.auth.api.signin.internal.SignInHubActivity};

have you declared this activity in your AndroidManifest.xml?

Can you please tell how I declare SignInHubActivity in AndroidManifest.xml file

Community
  • 1
  • 1
hharry_tech
  • 952
  • 1
  • 8
  • 24

3 Answers3

13

Really I was doing very silly mistake. I just declare activity see below...

<activity
          android:name="com.google.android.gms.auth.api.signin.internal.SignInHubActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateAlwaysHidden|adjustPan" />

Now my problem solved. Google signin working fine.... Thank you

hharry_tech
  • 952
  • 1
  • 8
  • 24
  • 1
    I got exactly the same problem today, but there should be a better solution. `startActivityForResult()` should not reqire to declare every activity it starts, because often it is not known in advance. I am using Eclipse but when I tried AndroidStudion there were not need to add anything in the manifest. What IDE are you using? I wonder how to configure Eclipse project correctly. – Kirill K Dec 01 '15 at 23:55
  • @hharry_tech can you help me with signin? I am also using eclipse. and always get error like" signin_required." – Sagar Maiyad Mar 02 '16 at 10:10
  • You would need a **zero argument constructor** in your SignInHubActivity in order to avoid a crash. – IgorGanapolsky Dec 13 '16 at 21:58
  • Thank you so much you wouldn't believe how long this held me up – Kibi Mar 26 '17 at 16:15
1

Are you using Eclipse with ADT? (Android Development Tools plugin). Have you followed instructions here to set up Google Play services SDK? https://developers.google.com/android/guides/setup

If you set it up correctly, I believe SignInHubActivity definition will be automatically merged into your manifest from Google Play services SDK and you don't need to explicitly declare it.

Isabella Chen
  • 2,421
  • 13
  • 25
0

I've had same problem. Finally I solved it. It is caused by "Manuel Migration to AndroidX". I've followed instructions in this video: https://www.youtube.com/watch?v=0FZ_eUIsLTg

and problem solved.

the key factor is upgrading the compileSdkVersion to the newest. and it is recommended to make all versions up-to-date in files build.gradle, app/build.gradle, pubspec.yaml.

then Android Studio manages migration successfuly, and ActivityNotFoundException problem is solved.

And final reminder for Turkish guys. You should change these keywords (in app/build.gradle) as following:

testImplementation -> testİmplementation

androidTestImplementation -> androidTestİmplementation

Gökhan E.
  • 75
  • 8