Google Play Services does not work after export - android

When I run my app in Eclipse, Google Play Services works normal. But when I export signed application package and install myapp.apk to my phone, app display error The app is incorectly configured....

This is probably because of a directory change, your phone can't find the proper files to launch the app anymore. Try to re-install the app, this will set the right paths and should solve your problems.

Try by updating your device's "Google Play Services". It may help you.

You may try checking copy to my project/workspace option when import google-pay-services-lib in eclipse.

Did you create an OAuth Client ID with the certificate fingerprint from the key that you use for signing the exported application?
Maybe you created one for the debug key (which is the key Eclipse uses when launching the app), but forgot to create and link another one for your release key.
You can find detailed information here: https://developers.google.com/games/services/console/enabling#step_3_generate_an_oauth_20_client_id
After you created the second client ID át the google api console, linking it to the game is not so trivial: you have to link the already linked app again, and you will see that this time it will show the second client ID.
Good luck.

Related

laravel API and how can i send a token? [duplicate]

I've found the following error when running my android application in android studio. app couldn't get installed on my device because of this error. Didn't find the solution :(
please help
Auth: [GoogleAccountDataServiceImpl] getToken() failed.
Status BAD_AUTHENTICATION,
Account: ,
App:com.android.vending,
Service: androidmarket com.google.android.gms.auth.be.account.b.d: Long live credential not
available.
I had the same issue what helped me was that I had wrong credentials in my google-services.json file and after getting a new file my problem was fixed.
in the process of resolving this issue I also updated my google play services but I do not think this is necessary .
I got this error when tried to install app directly from Android Studio.
It was due to certificate mismatch, since I used release certificate for setting up the app in Play Console, while Android Studio signs the app with debug certificate by default.
Installing app via adb resolved the error.
https://developers.google.com/games/services/android/quickstart#step_4_test_your_game
Make sure to run an APK that you exported and signed with a
certificate that matches one of the certificates you used during the
application setup in Google Play Console.
I have the same problem some days ago. I just compile my whole code in a new project and Problem Solved!!.
Don't know what was the real problem. There is an issue filed here, with no solution.
There are several reasons you can get that message:
The account you are trying to log on with needs to be re-authenticated on the phone (try a different account)
The gms:play-services version is out of date (needs to be 15+ as of Jan 2021)
Your app fingerprint is not the right one. You need one for dev builds, different one for prod -- which is different based on how you sign (do you have the final publish key, or does Play store re-sign with the final publish key?)
Follow the Google tutorial and get their stand-alone project, it should take 20 min, and check your setup there. If you are running it with all the right accounts it should work. Then go back to your app.
https://developers.google.com/identity/sign-in/android/start
I updated Google Play Services on my phone and stopped receiving the same error. I am importing com.google.android.gms:play-services-cast:9.6.1 and analytics:9.6.1. Not sure if the version running on the device was too low but problem is now resolved but not sure how to prevent this error for users running older versions of Google Play Services.
Tested the other solutions but nothing worked. Rebooted the device and error was gone.
If you using firebase server, As per the firebase updation if you give phone number authentication put your country code before contact number it is mendetory.
example - +91 9999998888
This happened to me, auth errors in ADB, among them:
android Warn Auth [GoogleAuthUtil] GoogleAuthUtil
Because, like mentioned above, I had a debug build running on phone previously. So I fully uninstalled the app on my phone, and the next [Build and Run] ran successfully.
Please try the App with new google credentials or even try creating the whole peoject on console og google play services if you have used it .
In my case it was a dependency version problem. I had to update the auth dependency for firebase to the latest one:
implementation 'com.google.firebase:firebase-auth:17.0.0'
Here is my take towards this problem:
You may be using a single email to try and log in to google. It may be possible you might have changed the password of the particular email in the recent past. Make sure u remove your google-email from your phone/emulator. When u re-run your application, you will be asked to enter both email and password credentials.
Check if your credentials.json is still valid. Sometimes its possible that your client ID might be removed/corrupted if you have not used your android application for a long time. Make a new one and dont forget to copy-paste it in app folder of Android Project view.
PS: I am new to Android Studio and writing answers on stackoverflow in general. If you are reading this comment please let me know what improvements i can make while answering questions in the future.
I copied and ran the code in a different project that had priorly worked on simple DB operations of Firebase. Probably it already had the authentication files in place so launching the app was solved there
Mostly your token has gone bad. And needs a new one.
Go to project database > settings > General > download Json file and replace it with the one in the local project directory.
I fixed this problem with updating fingerprints (sha1 or sha256)
My problem was with Microsoft App Center.
We recently set our pipelines to send aab files to App Center, instead of apk files.
It seems that our bundle was resigned by App Center with some generated keystore. That's how App Center distributed apk files, even though our pipeline uploaded aab files.
In other words: even though our pipeline is using our own keystore to sign the aab bundle, in order to distribute through the App Center, after sending the aab to App Center, the App Center is creating universal apks with another generated keystore.
After rolling back our pipeline to send apk instead of aab, Google SignIn on our react-native app with firebase was working again.
"When you distribute Android Application Bundle (AAB), App Center generates a universal APK, signs it with a generated signing key, and distributes it to a device."
Source: https://learn.microsoft.com/en-us/appcenter/distribution/uploading

How to update android app without uninstalled from device

when i try to update version in my android app to own site. The problem will be occured during the installation. that's
App not installed
An Existing package by the same name with a conflicting is already
installed.
Can any one help how to download updated app without uninstall.
Thanks in advance.
you have to change both
android:versionCode="4"
android:versionName="1.0.4"
android:versionCode is a integer, eveny update increment by 1
android:versionName can any string
and you use same Keystore
If your installing from your own site, don't increment the version code and name of new apk your uploading, use the same code and name of already existing apk, it will replace the existing one so no need to uninstall the app.
Try by enabling the "install app from unknown source" in device settings
Best way to do Even if your using the app for internal purpose you can sign the app using live keystore(not debug keystore) and upload it in your own site.
Another way to avoid getting your scenario:
If you want only some particular users to download the app that is the reason if you have hosted your app in your own site means, google provides an option to do this for testers where you can add their email in alpha testing or beta testing so that whenever you upload an apk to playstore those users who you have added will be notified and can update the app without uninstalling the existing(this wont be visible to all users who you have not added).

Installing an apk file received by email

I have finished my android app work and the apk is signed.I have to give the app to someone for whom I have made the app .If I am sending it as email attached will it be installed or not.I searched in the net but it gave me confusing answers.Is there any other better way to send the app.Please help me
No it won't. The user has to activate installing apps from unknown sources in the settings and that he/she can install the attached app.
Better sign up on the Google Play Console publish you app in the alpha or beta stage and add the user as a tester. Than the user just has to become a tester and he/she can download the app from the play store
If you plan to release multiple versions to your client regurlarly, you can try releasing it via GooglePlay alpha or beta release.
Advantage: You can track your app version and crash reports, etc.
Yes
First of all goto mobile Settings / Application / Settings and check the box next to Unknown sources option. then click on apk downloaded from email and install.
I guess any mail service firstly will not let you attach .apk file to any mail.
Better store it on cloud service and access it from any where. also do not forget to set allow files from unknown sources in your android phone to true.

Google Play Game Services sign in button spits "Unknown error"

I'm trying to use Google Play Game Services in my practice Android app.
I got the sign in buttons UI as explained in the developer guide. When I hit the sign in for the first time, it guides me through sign in process. Right after it's about to finish the process, it gives me a dialog with "Unknown error". After the first time, it always gives me this dialog after displaying the loading animation for a bit.
I imported BaseGameUtils and google-play-services_lib. I attached reference from BaseGameUtils to the google-play-services_lib. Then attached reference of these 2 to my game project.
I exported the project to get the SHA1 to put in the developer console. Then I have my 12 digit app id to place on the values/ids.xml (got the meta tag under application).
Tried cleaning the project, redoing the SHA1/keystore process and no luck. My email is under the testing access.
I read and tried the solutions provided on this question, but it was not my case.
Google Play Game Services - unable to sign in
Anybody experiencing the same or does anyone have a solution I should try?
Try going to your Google+ settings on your device and purging the access that you had granted the app. Afterwards, MANUALLY set up Google+ for your test account, either through a PC/Mac web browser or through your device, then try re-linking the app. This worked for me.
Exact steps for Samsung Galaxy S3:
Settings -> Google -> Google+ -> Apps with Google+ Sign-In -> tap the app and at the bottom, tap Disconnect App.
For what it’s worth, I also tapped the option to “Delete all activity for this app” as well when I deleted it.
Your ids.xml has to look like:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_id">XXXXXXXXX</string>
</resources>
And, in your manifest, you have to add:
<meta-data android:name="com.google.android.gms.games.APP_ID"
android:value="#string/app_id" />
Good luck!
I recommend utilising the debug log trace in the GameHelper class to get a clearer picture of the error. You can simply make a call in your onCreate to do this...
enableDebugLog(true, "fred"); where "fred" is the tag you want to show on logcat
It is most likely that you will then see an error like "OnConnection Failed result 4... SIGN IN REQUIRED. If you then search SO for that message you should be able to make some progress.
Another possibility:
I managed to get my own leaderboard into production last night. The error you are describing is one that I (and judging by other comments that I have seen in error reports on SO ) and other people have also encountered. I found that I was unable to use the google account that I user in the developer console to sign on, even though it is explicitly listed as a testing account for the game. I tried shutting down the emulator, deleting and redefining the game in the developer console etc. but I have never been able to get it to work.
I used a different account and I was able to sign on. I do not know what the problem is with my developer console account - I also use it in Google Plus without problems. Incidentally, I am still unable to use my developer account on the production app with a real device.
My advice is to use a separate account for testing. Good luck !
If you are using your production keystore to get the fingerprint, you need to export and use a release build. Otherwise, use the debug keystore to get the fingerprint.
According to https://developers.google.com/games/services/console/enabling#b_create_a_client_id - if using eclipse, the debug keystore is located at
~/.android/debug.keystore
One more thing, for me, I couldn't sign in using my publisher account but one of my other accounts worked ok. Maybe worth a try.
One additional thing that can be tried is to send (as attachment) the exported and signed yourapp.apk to the tester's account's email, and then install the app through email (by clicking on the attachment), and not through the usb.
It seems to me the problem here is not with play services, but with google+, as it sometimes takes several days for the changes (such as deleting some info) to take effect. If nothing works, create a new gmail account, and try again (that's what "worked" for me eventually :)).
Edit: old accounts that didn't work initially started working after 4 - 5 days. Maybe it just takes Google some time to synchronize everything.

Install developing application and play store application in the same android phone

I had submitted an application to Google play store that is running on the real server.
On the other hand, I am still improving the application with a fake server. The reason of having 2 server is because all data in the fake server will not affect the real server.
Whenever I want to do demonstration with the real server, I have to uninstall the test app and download the real app on Google play stall. After the demonstration, I have to uninstall the real app and then install my test app on the android phone. It is kind of troublesome after doing this more than 2 times a day.
Is there any way I can install both the test and the real app on the same phone?
I tried to rename my package name. But I found the refactor function in eclipse not a clean renaming. I have to manually rename some of the file and this take up a lot of time.
Just wondering if there is any other better way to do it. It would be good if there are some suggestion that I can try.
Replace your debug key with your production key and set the appropriate passwords to allow the signing. This way Android will let you update/overwrite the old version.
In Eclipse, select Window --> Preferences--> Android --> Build
You can have your keystore pointed here
However, your key store must use the same profile name and password as the default key store.

Categories

Resources