I've switched from android studio to xamarin for an application (game) I've already configured in google play developer console. I've copied and pasted the debug.keystore to C:\Users\my profile\AppData\Local\Xamarin\Mono for Android\ and cleaned the solution (I'm on visual studio 2015). The solution builds fine but the application is never installed to my Genymotion device. I see the following:
Android application is debugging. The application could not be
started. Ensure that the application has been installed to the target
device and has a launchable activity (MainLauncher = true).
Additionally, check Build->Configuration Manager to ensure this
project is set to Deploy for this configuration.
When i revert to the old keystore, clean, and build/deploy it works again. How do I fix this?
I've found that when the keystore changes, you have to follow a different uninstall process. Try uninstalling the app through the Application Manager. Depending on your version of Android, it's usually somewhere in Settings -> Applications -> Application Manager -> Find the app in the list, select it, uninstall.
For some reason, just using the trash icon to uninstall the app doesn't seem to remove the code signing information. But if you use the Application manager to uninstall, that will remove the code signing information. Then you can build and deploy with a different keystore.
Related
I am using unity addressables for on-demand packs and also using google instant play plugin to build an instant app. I am using the unity's Build Settings -> Build and Run with my device connected. I have developer debugging enabled and the device is connected via usb. The aab file is built and saved on my local machine and when the build completes, nothing happens on the device. Shouldn't the game just start on the phone? When I search the phone, the app is also not anywhere to be found.
Any solutions?
So here is more of a workaround for this problem. The real solution needs to come I believe from either Unity or Google teams.
FIX:
Go to File -> Build settings -> player settings
Change the Company Name: com.yourname.currentname (to something else). Let's say: com.yourname.currentname2. And do the same for the packagename under "Other Settings".
Build and Run (having the device connected via USB and USB debugging enabled)
It should work. If still doesn't, make sure you uninstall your game (assuming you had it installed before on the device). If not installed, install it from the google play store or from an older apk, open the app info and clear all cache and data. Then uninstall it. Try the above steps for the fix.
On my side, I already had a published google play store app and now building an instant app for the same build. I uploaded a few instant app versions on the play store and installed them on the device. At that point I am not sure how google play handles the different versions (installed and instant one) and something terribly gets messed up. Is it caching some files somewhere? So aiming at a clean state is the key.
In my emulator, when I try to do an upgrade of my apk programmatically. I get:
Android App Not Install.
An existing package by the same name with a conflicting signature is already installed
I'm still in the testing phase of this upgrade, so the file I download is a signed apk of a previous version, which I think should work without any issues.
From the suggestion in: an existing package by the same name with a confilcting signature is already installed I tried to run the emulator both in debug mode and in normal mode... neither worked.
Any thoughts on what I'm missing?
I had the same error message, but these answers did not help. On a 4.3 nexus 7, I was using a user who was NOT the owner. I had uninstalled the older version but I kept getting the same message.
Solution: I had to login as the owner and go to Settings -> Apps, then swipe to the All tab. Scroll down to the very end of the list where the old versions are listed with a mark 'not installed'. Select it and press the 'settings' button in the top right corner and finally 'uninstall for all users'
The problem is the keys that have been used to sign the APKs, by default if you are running directly from your IDE and opening your Emulator, the APK installed in the Emulator is signed with your debug-key(usually installed in ~/.android/debug.keystore), so if the previous APK was signed with a different key other than the one you are currently using you will always get the signatures conflict, in order to fix it, make sure you are using the very same key to sign both APKs, even if the previous APK was signed with a debug-key from another SDK, the keys will definitely be different.
Also if you don't know exactly what key was used before to sign the apk and yet you want to install the new version of your app, you can just uninstall the previous application and reinstall the new one.
Go to Settings > Apps, find and open the app info. Then, open the overflow menu (3 vertical dots), and choose Uninstall for all users.
Go to Settings > Apps, find and open the app info. Then, open the overflow menu (3 vertical dots), and choose Uninstall for all users.
If you are using the debug apk, the key that is used to sign it is in
C:\Users\<user>\.android\debug.keystore
If you use that same key, there should not be a conflict when installing.
If you don't want to bother with the keystore file, then just remove the package altogether for all users.
Connect your device with Mac/PC and run adb uninstall <package>
Worked for me.
Ref: https://android.stackexchange.com/questions/92025/how-to-completely-uninstall-an-app-on-android-lollipop
If above solutions did not work for you then you may have doing something as following ..
1) installing the app from Appstore.
2) updating it with sign APK with same package name updated version.
So basically there are two kinds if APK's.
1) you uploaded on playstore known as original APK.
2) download from playstore known as derived APK.
In this case basically you are downloading derived apk and updating it with original APK.
For let it work fine uploaded new signed released APK in the internal test mode on the Google Play Store and download the derived APK to check the update scenario.
There is a difference between signed and unsigned APK files. Most likely you had an unsigned on there previously. You just need to delete the unsigned before you install the signed version. How this can be accomplished varies on the exact version, but in general, go on the emulator to settings-> application, long click your app, and delete/remove/uninstall it.
If you use multiple users at android, verify that the app is uninstalled everywhere.
It may be application is not uninstall successful. If your device is this case, you can try this method.
First get the package name of the application, e.g 'com.xxx.app', you can use Root Explorer and find it from Manifest file(RE can decode the file). then you can use this script to uninstall it:
adb shell pm uninstall com.xxx.app // replace to package name that you want to remove
I had an issue where both debug and release build won't install on devices I used for debugging. The same msg would appear when trying to install the new version. The only workaround was to uninstall the current version and install the new one.
It looks like Android studio marks the apk it installs so that installation using the package managers would distinguish between version installed for debugging and versions downloaded from Google play or other external sources (this never happened to me when using eclipse).
There may be another reason when your application will not update when you either change/add/remove shareId in AndroidManifiest.
"android:sharedUserId"
Please check that also.
To prevent would recommend to use sharedUserId in your application despite in your current requirement you need or now.
Same package error:
Create a new Package in your app with different name.
Copy and paste all file in your old package to new Package.
Save Code.
Delete old Package And Clean and rebuild project.
I had to login as the owner and go to Settings -> Apps, then swipe to the All tab. Scroll down to the very end of the list where the old versions are listed with a mark 'not installed'. Select it and press the 'settings' button in the top right corner and finally 'uninstall for all users'
I tried all the above and it did not work.
I found that in spite of uninstalling the app a new version of the app still gives the same error.
This is what solved it:
go to Settings -> General -> application Manager -> choose your app -> click on the three dots on the top -> uninstall for all users
Once you do this, now it is actually uninstalled and will now allow your new version to install.
Hope this helps.
I just choose uninstallAll in Gradle Bar. It worked for me.
I wrote an android app that works fine, but when copy the project and open from another android studio by the exact sdk & same app Id and try to debug; android studio wants to uninstall the last app i install from first Android Studio.
How to prevent uninstalling the existing app and just update that.
That's because all systems have different debug(auto generated) signing keys. if you don't want to unintsall app installed by another system, you have to make sure both are using same debug.keystore. so just copy paste the debug.keystore from one system to another and you're good to go.
Its location for mac/Linux is:
~/.android/debug.keystore
and windows is
C:\Users\<Username>\.android\debug.keystore
I am attempting to run my app in an emulator and have been receiving the following error:
Installation failed since the APK was either not signed, or signed incorrectly.
If this is a Gradle-based project, then make sure the signing configuration is specified in the Gradle build script.
I am attempting to run the app with a debug setting so signing the app should not be necessary as it will be given a temporary signature upon building.
This happens often when you install the same app generated on a different computer. Even the unsigned apk has a signature, so your phone is confused why you're trying to install something with the same package name that was generated on a different computer.
Go to your settings -> apps, then find the app in the list, and clear its data and uninstall it.
Then try installing again. That'll fix it.
This problem can be resolved by below two ways
Change Built Variant to debug
Define your application`s signingConfigs
First solution works when you built your application in debug mode. But, once you are ready to publish your application on Google Play store you need to go by second way.
Read for more -> Sign Your App
Hope this will help one and all!
I had this same problem occur last night. Running in debug, in my case the app had previously been installed from weeks ago, and I had deleted it, but I was still getting the error and couldn't install it again. I was able to resolve it by going into the AVD manager and wiping user data from there. After that installation and debugging went fine.
There may be already install current app with certificate
uninstall it and try again
I solved it more or less following the answer of Alex K above, but did not know where to look for 'settings' (total beginner!).
So go to the AVD manager (icon of mobile in toolbar) and click on the arrow on the far right, a small menu appears and here you select 'Wipe Data'.
You do need to first close the emulator.
What I tried:
Clean Project and Build again
Invalidate cache (File -> Invalidate Caches/Restart ...)
Reinstalled Debug certificate in case it expired
Cleared Gradle cache
Add signing process to Gradle
Went to settings -> apps in the Emulator and deleted previous versions (as explained in this thread)
Wiping Emulator data through AVD interface
Upgraded gradle version
None of those solved the issue.
In the end I executed the compilation/signing steps manually until I found the culprid: One of the file in my asset folder was 'Icon?' generated by MacOSX
In order to detect it I followed the instructions here to Build an unsigned APK and sign it manually:
https://developer.android.com/studio/publish/app-signing#sign-manually
When I ran step 3 (apksigner) I got an exception with message cannot sign apk because of file ..\folder\folder\Icon?
I understand that what was happening is that Android Studio did not capture the exception and tried to deploy the unsigned application onto the emulator.
Once I removed the file and tried again I no longer had the issue.
(quite a pain to find the root cause...)
So, step 1:
Run the standard check (clear cache..)
IF you have a MacOSX, check if one or multiple of your file is 'Icon?'
Step 2 - run the steps manually
If you still get this error in debug mode, follow these steps:
Clean your project
Run it again
This works for me on Android 2.2 Beta.
In my emulator, when I try to do an upgrade of my apk programmatically. I get:
Android App Not Install.
An existing package by the same name with a conflicting signature is already installed
I'm still in the testing phase of this upgrade, so the file I download is a signed apk of a previous version, which I think should work without any issues.
From the suggestion in: an existing package by the same name with a confilcting signature is already installed I tried to run the emulator both in debug mode and in normal mode... neither worked.
Any thoughts on what I'm missing?
I had the same error message, but these answers did not help. On a 4.3 nexus 7, I was using a user who was NOT the owner. I had uninstalled the older version but I kept getting the same message.
Solution: I had to login as the owner and go to Settings -> Apps, then swipe to the All tab. Scroll down to the very end of the list where the old versions are listed with a mark 'not installed'. Select it and press the 'settings' button in the top right corner and finally 'uninstall for all users'
The problem is the keys that have been used to sign the APKs, by default if you are running directly from your IDE and opening your Emulator, the APK installed in the Emulator is signed with your debug-key(usually installed in ~/.android/debug.keystore), so if the previous APK was signed with a different key other than the one you are currently using you will always get the signatures conflict, in order to fix it, make sure you are using the very same key to sign both APKs, even if the previous APK was signed with a debug-key from another SDK, the keys will definitely be different.
Also if you don't know exactly what key was used before to sign the apk and yet you want to install the new version of your app, you can just uninstall the previous application and reinstall the new one.
Go to Settings > Apps, find and open the app info. Then, open the overflow menu (3 vertical dots), and choose Uninstall for all users.
Go to Settings > Apps, find and open the app info. Then, open the overflow menu (3 vertical dots), and choose Uninstall for all users.
If you are using the debug apk, the key that is used to sign it is in
C:\Users\<user>\.android\debug.keystore
If you use that same key, there should not be a conflict when installing.
If you don't want to bother with the keystore file, then just remove the package altogether for all users.
Connect your device with Mac/PC and run adb uninstall <package>
Worked for me.
Ref: https://android.stackexchange.com/questions/92025/how-to-completely-uninstall-an-app-on-android-lollipop
If above solutions did not work for you then you may have doing something as following ..
1) installing the app from Appstore.
2) updating it with sign APK with same package name updated version.
So basically there are two kinds if APK's.
1) you uploaded on playstore known as original APK.
2) download from playstore known as derived APK.
In this case basically you are downloading derived apk and updating it with original APK.
For let it work fine uploaded new signed released APK in the internal test mode on the Google Play Store and download the derived APK to check the update scenario.
There is a difference between signed and unsigned APK files. Most likely you had an unsigned on there previously. You just need to delete the unsigned before you install the signed version. How this can be accomplished varies on the exact version, but in general, go on the emulator to settings-> application, long click your app, and delete/remove/uninstall it.
If you use multiple users at android, verify that the app is uninstalled everywhere.
It may be application is not uninstall successful. If your device is this case, you can try this method.
First get the package name of the application, e.g 'com.xxx.app', you can use Root Explorer and find it from Manifest file(RE can decode the file). then you can use this script to uninstall it:
adb shell pm uninstall com.xxx.app // replace to package name that you want to remove
I had an issue where both debug and release build won't install on devices I used for debugging. The same msg would appear when trying to install the new version. The only workaround was to uninstall the current version and install the new one.
It looks like Android studio marks the apk it installs so that installation using the package managers would distinguish between version installed for debugging and versions downloaded from Google play or other external sources (this never happened to me when using eclipse).
There may be another reason when your application will not update when you either change/add/remove shareId in AndroidManifiest.
"android:sharedUserId"
Please check that also.
To prevent would recommend to use sharedUserId in your application despite in your current requirement you need or now.
Same package error:
Create a new Package in your app with different name.
Copy and paste all file in your old package to new Package.
Save Code.
Delete old Package And Clean and rebuild project.
I had to login as the owner and go to Settings -> Apps, then swipe to the All tab. Scroll down to the very end of the list where the old versions are listed with a mark 'not installed'. Select it and press the 'settings' button in the top right corner and finally 'uninstall for all users'
I tried all the above and it did not work.
I found that in spite of uninstalling the app a new version of the app still gives the same error.
This is what solved it:
go to Settings -> General -> application Manager -> choose your app -> click on the three dots on the top -> uninstall for all users
Once you do this, now it is actually uninstalled and will now allow your new version to install.
Hope this helps.
I just choose uninstallAll in Gradle Bar. It worked for me.