Re-installation failed (YES) Package already exists - android

So, I have an app which I am running on real device. When running the app the following dialog is shown.
Clicking Yes is followed by error in Console
- google-play-services_lib] Installation error! The package already exists.
- Launch failed on device:
I have tried uninstalling app from my phone but didn't work.
Any idea how to fix it?

You dont need to reinstall google-play-services. It's updating automatically by Play Market.
I had problems like yours and let me guess:
when you debuging app from eclipse - google play services doesnt sign in, but when u release it and download from play market - it works fine.
If its true, so mark your google-services as a library and delete from "java build path" in your app.
right click on project-> Properties -> Java Build Path -> Projects
Delete google-play-services from there
Now, you have to obtain debug certificate SHA1
in Eclipse go to Window->Preferences
Andoid->Build
(there you can find debug certificate SHA1 for debuging)
Go to Android Developper Console https://play.google.com/apps/publish
Select your game in Play service
Go to "linked applications"
Create a NEW linked application android and put it your debug certificate SHA1
Wait a few to changes be deployed
You will get two similar links, but with different SHA1 ( one for debugging, second for releasing)
Now, you need to clear the Android Application cache before trying to connect
Clear cache of your application
Launch your app
I solved my problem like this

That's caused by attempting to install an apk maybe from the ide with debug keystore on a device that has the production apk with the production keystore. Just go into the phones app settings and uninstall the app. I get a few of these after I test the upgrade path from the beta store and then go back to developing with the ide.

try doing it through command prompt use:
adb uninstall PACKAGE_NAME
and see if it works
also try renaming the package name just to be sure.
I feel you are trying to install google-play-services.You don't need to update google play services.From the docs:
The Google Play services APK
The Google Play services APK contains the individual Google services
and runs as a background service in the Android OS. You interact with
the background service through the client library and the service
carries out the actions on your behalf. An easy-to-use authorization
flow is also provided to gain access to the each Google service, which
provides consistency for both you and your users.
The Google Play services APK is delivered through the Google Play
Store, so updates to the services are not dependent on carrier or OEM
system image updates. In general, devices running Android 2.3
(Gingerbread) or later and have the Google Play Store app installed
receive updates within a few days. This allows you to use the newest
APIs in Google Play services and reach most of the devices in the
Android ecosystem (devices older than Android 2.3 or devices without
the Google Play Store app are not supporte

Related

Distribute apk outside play store (to non gms devices)

I have this app released on play store that I want to make available on my website. I tried downloading the signed apk via the Google play console and use that, but some users in China have issues installing it.
They get a message like this while installing: "Your device does not support Google Play Services and cannot install "
I have a few Google sdk bits referenced in my project (signin, safetyNet, ads) which I would assume I need to delete before building for this apk version, since target devices don't have gms..
What about signing? Can I simply build without the said code and distribute it? (Generate release apk in android studio) Or do I need to upload to play console and download the one signed from google?
Please let me know if you have any clues on this, been banging my head around for a few days already.
Cheers :)
This might help you taking your decision:
If you have Play App Signing enabled, the APK generated through your studio and the APK generated through Play Console will have different signatures.
Otherwise, both approaches will have the same signatures.
So, it depends whether you care about your APK on website having the same signature as Play Store. If you don't care about having same signature, you can go ahead with creating APK from Android Studio itself and publish to your website.
If your app utilizes Google Play Services, as is informed by the error message, then it WILL not run on the device unless Google Play Services and everything that it depends on is installed on the device. The only work around is to convert your app features that uses Google Play Services to its alternative that's supported in China.
I've dealt with similar issue on Huawei smartphones, my approach was to 'develop another app' using Huawei SDK, check out https://developer.huawei.com/consumer/en/ for its complete reference

How to generate shareable APK from my react native project

I generated signed apk - but the result non installable apk
Apk not installed and these are the initial warnings
generating debug (not signed apk) is not working with the client
Could not connect to development server (500)
I just can't share the apk with my client - that's too bad
Google Play Protect is a feature that protects your device by scanning apps that are downloaded from the store or installed with APK. I think it's good to set it up because it protects your smartphone, but sometimes you have to turn it off because it doesn't work when you install the APK as needed or because of this feature.
ex) Apps not installed during app installation.
Launch the Google Play Store and click on the left menu bar to
select Play Protect.
You can see that Play Protect is working here. To turn off
features, search the lower device for security threats and select
the feature supplement to detect harmful apps to turn off.
Click OK when the warning window appears.
If you are getting error like development server error, you need to generate release build apk of your project. There is a documation about how you should generate your apk in link below.
Documation

React native android apk installation error

I install my create signed apk in some other device, it gets installed once only. After I uninstall it and install again the same apk, then it shows error 'app not installed'.
Also, the user login work only on localhost but not on development server/apk.
I have tried cleaning the gradlew every time and regenerating new apk, but nothing works.
Kindly help to resolve the issue.
Installation fails if you try the same file if it is not an app added to Google Store in Android
The first option is to re-install the APK with the same code under a different name,
or
Your device is protected from harmful apps with Google Play Protection. This is why you must release the check.
Open the Google Play Store app Google Play on your Android device.
Next to Menu, Play Protect tab the following settings:
Disables the scanning feature for security threats on the device.
You should use your computer's ip address instead of using 10.0.2.2 if you are running on local device. PS: the codes are still running native in the end. There is a better explanation here. [explained][1]Android Localhost?
About the installation failing, I have not experienced. But maybe it's was already published in Google Play as hong described?

Installation failed with message INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package signatures do not match the previously installed version

I want to run my application in phone but I get following message:
Installation failed with message:
INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package signatures do not match
the previously installed version; ignoring!.
It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.
WARNING: Uninstalling will remove the application data!
Do you want to uninstall the existing application?
In my phone I have installed previous version of app from google play. I know that uninstalling old version of app from my phone can fix the problem but I don't want to do this because then I might lose all app specific data.
What I tried:
generating signed version of app using the same keystore.jks like previously
changing versionCode and versionName in build.grandle file and then generating new version of app
And still I have the same problem. What should I do to update my app without losing data?
There are two possibilities I can think of
You use Google Play App Signing. If you use Google Play App Signing then the signature in apps coming from Google Play will always be different to the app coming from your IDE. The only way you can get the update to work is to update the app from Google Play. The best way to do this during development is to use an "Internal test track". Google launched these at Google I/O this year and they let you update your app in seconds from Google Play. So when you have an update, don't install from your IDE, upload to Google Play internal test track, republish, and then update from Google Play. It is really quick.
You don't use Google Play App Signing, but you are trying to install your debug build instead of your release/production build. Make sure you are building the production release APK, so it is signed with the same key as the one uploaded to Google Play.
If I'm understanding correctly you want to re install the "same" apk in your phone but with some changes in the code (updates) but Android Studio can't install the new apk.
I can only think in one thing, this is the explanation:
Please remember that android has different "Build Variants" there could be many but you will always have "debug" and "production" build variants, as I can read, you have installed the one in Play Store this means that you have a "production" build variant already installed in your phone, so you need a new "production" variant version of your app with the same build data (code and name version) and the updates in the code.
Build a signed apk with the same data as the previous version (code and name version) (Just like the one you used to upload to Play Store).
Find the signed apk.
Use adb to check your connected devices, expect a list
adb devices
Use adb to install this new apk.
adb -s <device_identifier> install <apk_name_include_apk>
Following those steps should let you install what you need.
Go in your React Native > Android >app
in the app folder,
you can see a build just delete this folder and Clear React Native project by npm cache clean cmd/Terminal Command.
Now try to run I hope it will Run for some of you.
It's working for me.

GoogleSignInClient connects only when app's installed from Google Store

I am developing an Android game and currently trying to integrate with Google Play Game Services. I got stuck at the sign-on feature.
I use GoogleSignIn, getIntent, startActivityForResult etc. - all as described in Google manual. I think all's setup correctly, because when I build the app, deploy to Google Store (Internal Tests), and then I install it from there, all looks good: onActivityResult is called with result.isSuccess()==true and GoogleSignIn.getLastSignedInAccount returns != null.
The problem is when I try to run the app from Android Studio (or install APK manually). In this case, onActivityResult is called with SIGN_IN_REQUIRED and getLastSignedInAccount is always null. I am pretty sure all's setup fine (APK is signed, Android Studio is configured to sign the APKs etc.).
To ensure it's not about my Android Studio setup, I have installed manually exactly the same APK which I uploaded to Google Store but again - result is the same. When installed from Google Store, it's OK, when installed manually it's not (again: exactly the same APK binary).
Can you please help me? Theoretically I could continue development, but each I'd like to test something I'd need to upload new version to Google Store...
Thank you
Hmmm...its usual DEVELOPER ERROR, what you can do it..add your SHA1 code on firebase console, and it will work, it is showing this behaviour caus your signed key SHA1 is already added, that why it is working on release build and not on debug build, add your systems SHA1
How to get SHA1?
usually right side of android studio have a bar which says gradle click on it, expand it got to app>Tasks>android>signing report double click it...it will give you your SHA1, paste it on firebase console, wait for 1-2 minutes and check. It will work.

Categories

Resources