I have Google login feature in our application . And we are building apk from build system use "mm" or "make" command , I have included required necessary jar's for google login in Android.mk.
Now my problem is I am unable to login using Google if I require oauth token error returned is statusCode=unknown status code: 12501, resolution=null
String serverClientId = getString(R.string.server_client_id);
GoogleSignInOptions gso = new GoogleSignInOptions.Builder(
// Build a GoogleApiClient with access to the Google Sign-In API and the
// options specified by gso.
mGoogleApiClient = new GoogleApiClient.Builder(this)
After three days I got the solution for answer. Why it was working with Android Studio is , apk will get signed with debug key while building . Where as from the build system it is not signed with debug key . So what I am doing now is sign the apk with debug keystore after it is generated after "mm" command. We need to use MD5(SHA1) in Google account as well.
1. zip -d <APK> "META-INF*" 2. jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore <path to keystore>/debug.keystore <APK> keyalas passwords: android 3. <path to zipalign>/zipalign -v 4 <APK in> <APK out>