Android: Error Calling Googleapiclient.connect()
When i call method mGoogleApiClient.connect() the app crashes. the following code is copied from www.developers.google.com i want to implement Google Sign In functionality, but una
Solution 1:
A few things worth checking:
- Did you correctly setup your API console project in the Google Developer Console?
- If you are using Google Play Games Services, you must set up the project using the Google Play Games Console (click the
icon on the left).
If you are using Google Play Games Services, you may need to also add the following to your
androidmanifest.xml
:<meta-data android:name="com.google.android.gms.games.APP_ID" android:value="@string/app_id" /> <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/>
Your APP ID from the Google Play Games Services Console should be set in resources/values.xml, for example:
<?xml version="1.0" encoding="utf-8"?><resources><stringname="app_id">1234567890</string></resources>
Note that the App ID is just a unique ~10 character value not the longer string that is the client ID.
Solution 2:
<meta-data android:name="com.google.android.gms.games.APP_ID"
android:value="@string/app_id" />
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version"/>
This helped for me, be also sure you reference your build.gradle properly : Add in the dependencies : compile project(':BaseGameUtils')
Post a Comment for "Android: Error Calling Googleapiclient.connect()"