I am attempting to run some sample Android Pay API code following the guide here:
https://developers.google.com/android-pay/android/tutorial#setup
I'm using the sample Bikestore project provided in the link above. I followed the instructions to setup credentials/client ID for my app:
Google Developers Console
Created an Android Client ID for OAuth 2.0 using SHA1 fingerprint and entering the app's package name.
The app installs/runs successfully on my cell phone (Lollipop), however when attempting to "Login", it displays "An error occurring while contacting Google. Please try again later"
I believe I've found a solution. In the sample project, the following dependencies were defined in build.gradle:
dependencies {
compile 'com.android.support:support-v4:22.2.0'
compile 'com.google.android.gms:play-services-plus:7.8.0'
compile 'com.google.android.gms:play-services-wallet:7.8.0'
}
I added the following line and this seems to have fixed the connection issue:
compile 'com.google.android.gms:play-services:7.8.0'
Related
I am new to Android, and I was trying to Add GoogleSignin in my blank app.
I am following this tutorial from YouTube: https://www.youtube.com/watch?v=2PIaGpJMCNs, which says to add Gradle dependencies as shown in "Google's official documentation". But I don't see any such dependencies given in the official documentation.
I feel I am stuck in the process. Is it that the documents shown in the video are deprecated and now we don't need to add Gradle dependencies for Google SignIn?
I have performed the following steps:
1) Created a project in Android Studio
2) Added internet permission in manifest
3) Created a Project in Google Developer Console
4) Generated the SHA Key and added to the official documentation form
5) Generated the credential.json file and pasted it into the app folder of my Android Studio App
6) Installed Google play Services
7) Now the tutorial says to add Gradle dependencies in my project as provided in the "Official Google Documentation", but, as mentioned above, I could not find any such thing. I can't find anywhere in the page which tells me anything about adding Gradle Dependencies
To implement GoogleSignIn follow the following simple steps:
Add implementation 'com.google.android.gms:play-services-auth:15.0.1' in your app level build.gradle file.
Configure your project in Google console here
Follow further steps here
I use google map in project, but it is dont work rightly. I have registred Google map Api Key in google services and add in my project AndroidManifest.xml
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value=" Api key" />
But it is don't show map you can see it in this picture:
When i run my app, in tab Anroid Monitor of Android Studio i have this error:
I can't find resolve.
and in Api monitor i have this error too, when i open app
java.io.IOException: Server returned: 3
Did you added play-services dependency in gradle file?
If Possible change your play-service dependency and set dependency based on building tools installed or api installed, like following way
From
compile 'com.google.android.gms:play-services-maps:10.0.1'
To
compile 'com.google.android.gms:play-services-maps:10.2.1'
im trying to implement the aws api gateway into android studio, but i cannot find the MyApiClient class. Im following the tutorial: here
And in my build.gradle file i have the following imports:
compile 'com.amazonaws:aws-android-sdk-core:2.3.3'
compile 'com.amazonaws:aws-android-sdk-cognito:2.3.3'
compile 'com.amazonaws:aws-android-sdk-s3:2.3.3'
compile 'com.amazonaws:aws-android-sdk-mobileanalytics:2.3.3'
compile 'com.amazonaws:aws-android-sdk-apigateway-core:2.3.3'
compile 'com.amazonaws:aws-android-sdk-cognitoidentityprovider:2.3.3'
compile 'com.amazonaws:aws-android-sdk-ddb:2.3.3'
compile 'com.amazonaws:aws-android-sdk-ddb-mapper:2.3.3'
compile 'com.amazonaws:aws-android-sdk-lambda:2.3.3'
Hope you guys can help!
I think you did not complete the previous steps. From your link, on the top of the page:
In this section, we will outline the steps to use an Android SDK generated by API Gateway of an API. Before proceeding further, you must have already completed the steps in Generate SDKs of an API Using the API Gateway Console.
Generate the SDK of an API first
If you already did , are you sure you followed step 6 correctly?
I added Firebase Cloud Messaging to my Android app and I'm upgrading my old app from GCM to FCM. I tried the sample app by following the steps in Firebase Console, which works fine.
After embedding same code into the existing code in my app, even though the build is successful, while trying to run the app on a device in Android Studio, I get this error:
getting the error: more than one library with package name 'com.google.android.gms'.
See the dependencies screenshot taken from terminal. I checked the dependencies using
command >gradlew -q dependencies project name:dependencies --configuratio
n compile
Here is the result:
Any suggestion is appreciated.
Previously some modules in my app was using old jar files of googleplayservices.
After using google play services with same version
like below
dependencies {
compile 'com.google.android.gms:play-services:9.6.1'
}
I hope it will help some one needed.
I used google map in android version new 2.2 and I get same messages error in messages gradle build.
and event log
I don't know where is the problem. Can anyone help me?
Your project is exceeding 65536 methods. This is likely because you are importing the whole Google Play Services library doing
dependencies {
compile 'com.google.android.gms:play-services:9.6.1'
}
You can import only the modules that you are going to use. If you are only using Google Maps you can change your Play Services dependency to be
dependencies {
compile 'com.google.android.gms:play-services-maps:9.6.1'
}