I am implementing Google plus login system to my android app by following the tutorial of google developer at https://developers.google.com/identity/sign-in/android/sign-in
According to the tutorial, I should implement:
GoogleApiClient.ServerAuthCodeCallbacks
interface to enable server-side API access for the android app. However, 'ServerAuthCodeCallbacks' interface does not exist in the GoogleApiClient library, even in the latest version of the library.
Does anybody have the same issue? Or, am I missing something?
Any input will be greatly appreciated!
See the example implementation on GitHub: github.com/googleplus/gplus-quickstart-android
Your dependency on com.google.android.gms:play-services must be at least of version 7.0.0 (currently latest is version 7.5.0)
Class itself is currently placed in package com.google.android.gms.common.api in Maven sub-dependency play-services-base
So for example like this:
dependencies {
compile 'com.google.android.gms:play-services:7.5.0'
}
Also see current Developer documentation here:
https://developers.google.com/android/guides/setup#add_google_play_services_to_your_project
Related
I've uploaded an app to Play Store which was working fine till version 9 and I'm not able to figure out what is causing this issue. These are the libraries that I used in the app.
implementation 'com.karumi:dexter:6.2.1'
implementation 'com.github.esafirm.android-image-picker:imagepicker:2.4.0' // Image Picker
implementation 'com.paytm.appinvokesdk:appinvokesdk:1.2' // PayTM
Please use the latest version of App-invoke SDK which has been provided on developer documentation of paytm as well. Mentioning the version for your reference here as well
implementation 'com.paytm.appinvokesdk:appinvokesdk:1.5.3'
I have the following library for the google maps and it works fine
implementation 'com.google.android.gms:play-services-maps:16.1.0'
But when I try to add this one for location,
implementation 'com.google.android.gms:play-services-location:16.1.0'
the following error occurs
Failed to resolve: com.google.android.gms:play-services-location:16.1.0
Which library for the location should I use?
THANK YOU.
You will get latest gradle dependencies here
https://developers.google.com/android/guides/setup
It is probably because 16.1.0 does not exist for this library. Google Play Services libraries do not always have the same version. So maps might be on 16.1.0 but location might not even have this version.
To get the latest versions, check the official release page: https://developers.google.com/android/guides/releases
And as you are just starting, make sure to use the latest ones:
com.google.android.gms:play-services-location:17.0.0
com.google.android.gms:play-services-maps:17.0.0
Yes, it is a coincident that those versions are currently the same. As you can see in the list there are already libraries on 19.0.0, like appindexing
com.google.firebase:firebase-appindexing:19.0.0
Edit
A small practical tip: If you replace the version by + and sync the project, gradle will get the newest one and afterwards you can use the IDE warning to replace the + again with the newest version number. That eases a bit the checking on different pages if there is a new version or not etc
I want to publish my app to Google PLay
Error : "We found that the application uses the old version of the Google Play Developer API. From December 1, 2019, support for versions 1 and 2 of this API will cease. Update it to version 3 before this date. Read more ..."
I found, how to fix it, I need to gradle this library
implementation 'com.google.apis:google-api-services-androidpublisher:v3-rev95-1.25.0'
But when I build APK, studio show me error
<issue
id="DuplicatePlatformClasses"
severity="Fatal"
message="`httpclient` defines classes that conflict with classes now provided by Android. Solutions include finding newer versions or alternative libraries that don't have the same problem (for example, for `httpclient` use `HttpUrlConnection` or `okhttp` instead), or repackaging the library using something like `jarjar`."
category="Correctness"
priority="8"
summary="Duplicate Platform Classes"
explanation="There are a number of libraries that duplicate not just functionality of the Android platform but using the exact same class names as the ones provided in Android -- for example the apache http classes. This can lead to unexpected crashes.
To solve this, you need to either find a newer version of the library which no longer has this problem, or to repackage the library (and all of its dependencies) using something like the `jarjar` tool, or finally, rewriting the code to use different APIs (for example, for http code, consider using `HttpUrlConnection` or a library like `okhttp`).">
<location
file="D:\Applications\Radio\app\build.gradle"/>
</issue>
what am I doing wrong ?
Add this to project gradle
repositories {
mavenCentral()
}
Below code to your app gradle
dependencies {
compile 'com.google.apis:google-api-services-androidpublisher:v3-rev95-1.25.0'
}
Add this...
android {
...
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
}
}
I'm going to implement Sentry.io Log Service in my Android App.There is a comment in it's installation guide which says:
// this dependency is not required if you are already using your own
// slf4j implementation
compile 'org.slf4j:slf4j-nop:1.7.25'
I don't know I should add this dependency or not.
Does Android use it's own slf4j implementation?
As Henry said in comments, Android doesn't include an slf4j implementation, So I Should Add this dependency to get ready to setup Sentry.
I am using loginActivity in android.
ERROR
can not find symbol class Builder
I have also imported the file: com.google.android.gms.plus.PlusClient
Error on this line
mPlusClient = new PlusClient.Builder(this, this, this).setScopes(Scopes.PLUS_LOGIN, Scopes.PLUS_ME).build();
This is auto generated file from template.
What could be the reason for this error?
EDIT
I am using android studio
minSdkVersion 11
targetSdkVersion 21
I solved in my project by downgrading play-services to:
compile 'com.google.android.gms:play-services:6.1.71'
in dependencies in gradle file.
It is not available because it is deprecated. Use GoogleApiClient instead.
Start integrating Google+ : This is the official documentation for implementing Google+ client in your Android app for login and other requirements. Please follow this and not the auto-generated code from Android studio (until the code gets updated with newer implementation).
P.S. The other answer suggests to use older version of PlusClient, which is a wrong approach. You should be using newer code Instead of using older play services.