My Google Drive api works normally when i dont use the SIGNED APK, if i use, it return the error code 17 -> public static final int SIGN_IN_FAILED = 17;
and im using this in the proguard rule:
-keepattributes Signature,RuntimeVisibleAnnotations,AnnotationDefault
-keepclassmembers class * {
@com.google.api.client.util.Key <fields>;
}
-keep class com.google.** { *;}
-keep interface com.google.** { *;}
-dontwarn com.google.**
# Needed by google-http-client-android when linking against an older platform version
-dontwarn com.google.api.client.extensions.android.**
# Needed by google-api-client-android when linking against an older platform version
-dontwarn com.google.api.client.googleapis.extensions.android.**
i have just this informations =/, and ofc i have the api, key, sha1 at the developer console
You are very likely producing a release APK that does not have correct PackageName/SHA1 combo. The easiest way to check this are the following steps:
1/ Find the APK that's not working. Open the '*.apk' file in an unzipper (7-zip) and find 'META-INF\\CERT.RSA' file in the archive. Unzip it, for instance to your desktop
2/ Run 'keytool -printcert -file .\\desktop\\CERT.RSA'. You should see the 'SHA1' of the APK file. Compare it with the 'SHA1' in the dev console.
3/ Check the package name as well (it is in your manifest). The 'Package Name' / 'SHA1' pair is what authorizes the app version in Google Drive.
Good Luck
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.