Unknown error code during application install "-505" - android

I have checked this android 5.0 lollipop app install shows Unknown error code during application install: "-505". But it doesn't seem to address my case as I dont use multiuser env.
I have an app in the playstore which worked fine on my nexus 4(4.4.x) till i upgraded to lollipop and it showed this error every time i tried to install it from playstore(It installs fine if I run it via adb).
Can't understand why I might be facing this issue, neither is there any other reference to this error code.
Any help is appreciated.

This seems stupid on my part, yet finally found the answer which seems to be the fact that I had another dev app(diff package name) which had a common signed permission with the playstore app.
Buried deep in my logcat was this.
11-21 16:20:02.855: E/Finsky(8986): [1] PackageInstallerImpl.handleCommitCallback: Error -505
while installing <package>: INSTALL_FAILED_DUPLICATE_PERMISSION: Package <package> attempting to
redeclare permission <package>.permission.MAPS_RECEIVE already owned by
beginning with lollipop it seems this isn't permitted.
Thanks to everyone.
EDIT
The solution if not apparent yet is to change the permission from
<permission android:name="<old package>.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
to
<permission android:name="<new package>.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
or whichever signed permission that is causing the same.

With an official Lollipop version
and for mac users (i'm sure it's analogue to windows users):
Go to the terminal,
cd into: ADT/sdk/platform-tools
type ./adb uninstall the.app.package
and thats it!
you just uninstalled the app
don't add the -k flag - ('-k' means keep the data and cache
directories)
good luck!

This is caused by a bug with app certificate parsing in Lollipop:
https://code.google.com/p/android/issues/detail?id=79089

If the app you are trying to install has the same certificate as a similar app or related app with the SAME certificate, then Android 5.0 won't allow the installation, believing you are installing a duplicate of the already installed (but different) app. Only solution that worked for me? Uninstall the app with the same certificate, which would be an app made by same developer that made the app you are trying to install. Once you've uninstalled that app, install the problematic app, then go back and reinstall the other app which was already installed. This problem happened to me only once, when trying to install the FB Messenger app. I finally was able to install it after I uninstalled the Facebook app. Then I reinstalled Facebook after Messenger was installed. OK, good luck to all and hope this helps some of you.

Multiple users installing same app on same device may cause this error. Please remove other app from the device and that should work.
I faced similar issue, however in my case it was an old development build sitting on my device and when I was trying to install from play store this error was coming.

I have got similar problem and solved with this solution.
Solution: After you update your Android device to Android 5.0 Lollipop from an older version using Over-the-air update or sideloading factory image, do a factory reset. It has been found out that if you do a factory reset immediately after updating your Android version, the error does not occur, but if you don’t the error persists. Don’t forget to clear the cache too, going to Menu > Settings > Apps > Google Play Store > Clear Cache. Clear the data too, from the very same option.
Source: http://appslova.com/android-fix-unknown-error-code-application-install-505-error-505/
Hope this help!!

Try resetting the play store app. You won't lose your apps following these steps. Nothing important will be lost.
Steps to follow on a motorola xoom
Go to the app drawer (menu)
Tap settings
Tap applications
Tap the "All" tab
Scroll through and look for play store
Tap Play Store (not play store services!)
Tap "clear data"
You will then get a warning, click "ok"
That's it, go through your problem again and see if it fixed. Bear in mind you will have to re-accept the terms and conditions for the play store app, when this comes up, simply click "accept"

try adding applicationId to the defaultConfig section of gradle file like
defaultConfig {
applicationId "com.example.www"
}

Related

Getting "App Not Installed" message after attempting to install new version of Android app

I have an app that I developed wow like 8 to 10 years ago, but I have been updating it constantly at least once a year or so.
I'm actually in the process of completely redoing the app from scratch, and it's working great when I run it on my Android from my computer, but when I build it with a signing key on PhoneGap Build, I get the error message "App Not Installed." when I try to install the apk.
I've read through several other posts on the topic and I can attest:
I have plenty of storage space on the phone.
The new version number is larger than the old version number.
The signing key is the same as the original version.
I do not have any version of the app currently installed on my phone.
Any other ideas on what may be causing this?
I've removed all my plugins to take that out of the equation, but I still get the same error.
The original app was build with OnsenUI and Cordova.
The new app is build in Ionic 5.4.16, Cordova 9.0.0, and Android 8.1.0.
Something else I have noticed is that if I change the app id (com.company.appname) to anything else (i.e. com.company.appnamedev), it installs. I feel like this is very indicative of the issue, but I don't know what to do with it.
Very much appreciate any guidance to finding the problem.
Unfortunately this isn't going to be the answer many of you solution seekers are hoping for, but I got it to work. Based on Mike N.'s suggestion, I attempted to sign it locally and push it to my device with adb. In doing that, I was having trouble with remnants of two older plugins (onesignal and admob) that I had already removed from my config.xml file.
I'm really not sure why, but after I got rid of those old pieces in my package.json, I attempt to push it to phonegap build again and it was able to install. So, I guess the solution would be to make sure you have fully removed any plugins that may be causing problems.
Now the big trick - adding these pieces of functionality back in. But, the app compiles on PhoneGap Build and the signed file installs on my device now.
UPDATE: So, it turns out this is directly related to the one signal plugin I'm using. Still figuring out why, but when I added it back in, it works great locally, but when I attempt to build with PhoneGap Build and load it to my phone, I get the error "App Not Installed." At least I know what's causing it now.
I finally figured out the root of all my issues. As it turns out, I had another half baked app I started and had on my phone under a different name and app identifier, but I had temporarily dropped the same google-services.json and GoogleService-Info.plist files into that other app that I use for the one in question here.
After employing Mike N's suggestion, I got the error:
adb: failed to install mynewapp.apk: Failure [INSTALL_FAILED_DUPLICATE_PERMISSION: Package com.company.new attempting to redeclare permission com.company.new.permission.RECEIVE_ADM_MESSAGE already owned by com.company.old]
I uninstalled the old app that should not have had those files to begin with and everything installs and works great now. Hopefully this helps someone else out who encounters the same bizarre situation.
You can use My APK application and installing an apk using My APK Installer (MAI).
If there is an error, it will show the detail (like duplicate permission, provider, mismatch signature,...)

Cant Deploy To Real Android Device Xamarin

My problem is related to this post
Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE] even if app appears to not be installed
I am not able to deploy my app on a real device it works properly on the emulator , i get deployment error, but nothing in the errors tab.
This is from build output
2>Build succeeded.
2>An error occured. See full exception on logs for more details.
2>The installed package is incompatible. Please manually uninstall and
try again.
2>
========== Build: 1 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========
even after uninstalling the app i was not able to deploy my app on my real device , other apps install fine thorough VS.
There is no specific solution available for this problem , i think the reason is your phone OS doesn't completely uninstall your app, the app signature still lingers on(happens with heavily customized android, in my case its MIUI 8 ).
I found out using logcat - signatures do not match the previously installed version
Potential Solution 1:
Use Titanium Backup (Requires Root) to remove the app folder completely after uninstalling the app.
Potential Solution 2:
Go to settings and remove the app from there , make sure to use the option uninstall for all users(in MIUI 8 this wasn't available)
Potential Solution 3:
Use adb to uninstall your app completely its same as uninstall for all users.
adb uninstall yourpackagename
Incase you dont know it check in properties of your android solution.
Another way to find it
how to delete an app from adb without knowing it's package name
adb root
Then enter adb shell
adb shell
Find out your apps package name:
pm list packages | grep "your app name/something related to your app
name"
Then use:
adb uninstall
OR
pm uninstall
Potential Solution 4:(Not really a Solution)
Change the app package name - wont conflict with the one you have already installed
Note:Doing a hard reset of your device should solve the issue obviously.
In my case 4th option worked, if anyone knows how to remove the previously installed app signature from android please let me know i will update the answer accordingly(probably requires an in-depth knowledge of the file system).
There have a Simple hack
if a Brand new application - then simply Change Android Package Name and Deploy from VS
if already play store publish one - then install app through play store and uninstall. then deploy from VS
this Works for me
A quickly solution is by changing the package name in android manifest.
Go to real device Settings->Apps->All Apps, Now uninstall all the xamarin and mono packages as well as if the Debugging App is there also uninstall it and run again, This solved my same problem.
I know this is an old question, but it could be due to your build configuration. The Release and Debug configurations can and should be different w/r/t manifest entries, etc. I get the ADB0030 error if I try to deploy my Debug configuration. FYI.
I've tried to uninstall app and it has disappeared from Finder. However I received this error. Then I've used a utility (ie. Service Disabler) and the utility listed the app, then I've uninstalled by using utility's Uninstall menu. All gone.
If you have this problem, that's simple, if you have an older .apk of your application, then install this .apk, and after you uninstall.
This is the simple solution.
I had the same problem and I solved it by disable ransomware protection in Windows 10
I installed the app from Play Store, and then uninstalled from there. This seemed to remove it correctly from the device.

Install error when trying to update android application programmatically [duplicate]

I have a program working in the Android Emulator. Every now and again I have been creating a signed .apk and exporting it to my HTC Desire to test. It has all been fine.
On my latest exported .apk I get the error message 'App not installed' when I try to install the .apk. It runs fine on the emulators.
As I have mainly been testing on the emulators and only every now and again exporting to a real phone I am not sure when this happened. What is the likely cause of it not installing on a physical phone but running fine in the emulators?
I have tried rebooting the phone & removing the existing .apk, does not fix the fault.
Primarily for older phones
I only encountered the App not installed error when trying to install an apk on my phone which runs on 4.4.2 aka KitKat, but my friend did not encounter this error on his phone which runs on 6+. I tried the other solutions such as removing the old/debug version of the app because the apk was a release version, clearing the debug app's data, and even clearing all of my cached data. Then, finally I realized all I had to do was select both signature versions when building my signed apk.
Before I only had V2 (Full APK Signature) selected, but after selecting V1 Jar Signature as well, I was able to successfully install my signed APK on my 4.4.2 device.
For me, On Android 9 (API 28), disabling Google Play Protect from play store app worked the trick, and i was able to get rid of the App not Installed error.
To disable Google Play Protect. Open "Play Store" application => tap
on Menu button => select "Play Protect" option => Disable the options
"Scan device for security threats".
I had a similar issue and it was because I was trying to install an apk on a phone with a previous version of the same apk, and both apks hadn't been signed with the same certificate. I mean when I used the same certificate I was able to overwrite the previous installation, but when I changed the certificate between versions, the installation was not possible. Are you using the same certificate?
Clearly there are many causes of this problem. For me the situation was this: I had deployed to my nexus 7 (actual device) from within the Android Studio (v1.3.2). All worked fine. I then created a signed apk and uploaded to my Google Drive. After disconnecting my nexus from the usb, I went to the settings/apps and uninstalled my app (App1). I then opened google drive and clicked on my App1.apk and chose to install it (need to ensure you have allowed installation of apks in settings). Then I got the dreaded message "App not Installed"
Solution for me: go back into settings/apps and scroll though all apps and at the bottom was a pale version of my App1 (note the original App1 was at the top in Alphabetical order which was deleted as above). When clicking on the pale version it said "Not installed for this user". (I had set up my nexus to have more than one user). But in the top right corner there is a three dot button. I pressed this and it said "Uninstall for all users". Which I did and it fixed the problem. I was now able to click on App1.apk and it installed fine without the error.
I faced the issue when I update my android from 2.3.2 to 3.0.1 . If this is the case the IDE will automatically considers the following points.
1.You cannot install an app with android:testOnly="true" by conventional means, such as from an Android file manager or from a download off of a Web site
2.Android Studio sets android:testOnly="true" on APKs that are run from
if you run your app directly connecting the device to your system, apk will install and run no problem.
if you sent this apk by copy from build out put and debug folder it will never install in the device.
Solution :go Build ---> Build APK(s) ---> copy the apk file share to your team
then your problem will solve.
In my case I had the declared my launcher activity as android:exported="false"
<activity android:name=".MainActivity"
android:exported="false">
I recently targeted android 12 and had to put android:exported attribute in my manifest components, but did not know what to put as the value. changing the value to android:exported="true" worked.
I faced with the same problem. The problem was the main activity in my AndroidManifest.xml file was written twice. I deleted the duplicate.
For those who are using Android Studio 3.
Suryanarayana Reddy's Answer is correct thought it doesn't state steps to solve it, hence.
in your AndroidManifest.xml under the application tag add testOnly="false" and android:debuggable="true" like so:
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme"
android:testOnly="false"
android:debuggable="true"
>
Edit then in AndroidStudio's menubar Build > Build APK(s)
This can happen if you have your MainActivity declared twice in your AndroidManifest.xml.
Another possible reason: you changed the launch activity. Hint: never do it with already published applications! Reasons discussed in Android Developers blog.
I had the same problem. I did not realise that an app must be signed even for testing.
After self signing it, it installed fine.
My problem was: I used the Debug Apk, that was generated while I did the Run command from Android Studio
Solution was: Instead of using this file, clean project and click Build > Build APK(s) from Android Studio. Then you can use the generated APK from the usual folder (app/build/outputs/apk/debug/)
The file that was generated like this installed without a problem.
I had the same problem and here is how solved it : Go to the Manifest file and make sure you have the "Debuggable" and the "Test Only" attributes set to false. It worked for me :)
I had the same issue, i.e. App showed up as being installed, but would not launched when the icon was tapped. After some head-banging, I found that I had stupidly placed ' android:exported="false" ' for my main launcher activity within the AndroidManifest file.... Once I removed it, the App launched fine..
I know this is an old post, but for new users may be useful. I had the same problem: my application worked fine while debbuging. When I signed the APK I got the same message: "Application not installed".
I fixed that uninstalled my JDK (I was using jdk-6u14-windows-x64) and installed a new one (jdk-6u29-windows-x64). After export and sign the APK again, everything was ok!
Resuming, my problem was in JAVA version. Thank's Oracle!!
My problem was that I have multiple user accounts on the device. I deleted the app on 1 account, but it still was installed on the other account. Thus the namespace collided and did not install. Uninstalling the app from all user fixed it for me.
I faced a similar issue today and at first i thought it was my sd card which corrupted it. I tried it on many devices running android 4.4 and up but it kept bringing the same issue.After some googling and research i realized that i didn't select the v1 jar signature which is for devices older than android 7.0 nougat so i applied both of these signatures by selecting the two check boxes and generated a signed apk and it worked.
Link to solution Android – App not installed error when installing a signed APK – How to Fix
Sideloading debug apps for testing on a physical phone worked reliably until I upgraded the phone from Android Pie to Android 10. After that, the "App not installed" error came up every time I tried to sideload the app.
Based on a warning in my AndroidManifest.xml, I changed from...
<application
android:name=".App"
android:allowBackup="true" ... />
to...
<application
android:name=".App"
android:allowBackup="false" ... />
After that, I was able to sideload my app -- once. Then, I encountered the same "App not installed" error again. By changing allowBackup back to true, it worked again (at least once).
It is obvious from the number of answers and the variation in the answers that there are many reasons for this problem. I'm sharing this in case it helps others.
If you have a previous version for that application try to erase it first, now my problem was solved by that method.
If application's not installing, delete the file .android_secure/smdl2tmpl.asec from the SD card.
If the folder .android_secure is empty in the file manager, delete it from the PC.
ARGHHHHH! I was trying to install as Unsigned Release APK when the proper setting was DEBUG SDK.
There goes an hour.
In the end I found out that no apps were being installed successfully, not just mine. I set the Install App default from SD card to Automatic. That fixed it.
create keystore file through command line
keytool -genkey -alias key_file_name.keystore -keyalg RSA -validity 1000000000000000 -keystore key_file_name.keystore
export apk through Eclipse, right click on Android project Android Tools > Export Signed Application Package, then give keystore location & password.
this will crate signed apk at the same time apk will be zipaligned. And installable.
If you go through command line for all, some times you may face "Application not installed" error.
(Application not installed error can happen not only, when using command line. It can be some other reasons as well)
Using Android Studio, I had previously installed the unsigned debug version of the APK (Build > Build APK) and had to uninstall it before installing the signed release version (Build Variants > Build Variant: release, Build > Generate Signed APK).
I have also solved this issue,
The problem was that i declared my main activity twice,
On as the first activity to load and i specified also an intent-filter for it
And once again below it i declared it again .
Just make sure you don't declare your activities twice .
My problem was similar to that of #Lunatikzx. Because of wrong permission tag which was written as attribute to application:
<application
android:permission="android.permission.WRITE_EXTERNAL_STORAGE"
android:label="#string/app_name"
android:icon="#drawable/ic_launcher"
android:testOnly="false"
android:debuggable="true">
What fixed it for me was changing permission tag to separate tag like this:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
Apparently this can also be caused by renaming the APK prior to installing it. I wanted to reduce the amount of typing users had to do to get the app from our web site by shortening the file name. After that, they were unable to install it.
Once I reverted to the original file name used when creating and signing the package I was able to update the installed app.
In my case it was because I was using the alpha version of support library 28. Looks like Google marks these pre release versions as testOnly. If you really want to release like this (for instance, you want to push an internal beta like I did), you can add this line to your gradle.properties file:
android.injected.testOnly=false
Check with the Android version.
If you are installing non-market apps, and incompatible version you will get this error.
Ex: Application targetted to 2.3.4
Your device is 2.2
Then you will get this error.
The "Application not installed" error can also occur if the app has been installed to or moved to the SD card, and then the USB cable has been connected, causing the SD card to unmount.
Turning off USB storage or moving the app back to internal storage would fix the issue in this case.
I also encountered this issue.
Kindly try this solution. Make sure that the package name of your project is different from your previous project that was already installed in your mobile phone. I think they get conflict in their names. It works in me.

Can not install my own generated apk

I updated my app and tested it on my device. Everything works fine if I test the app via the run button in eclipse but if I export it into an apk and try to install the apk it fails.
There is no error code or anything else, it just says the app has not been installed.
Any idea why this happens? I only changed a few things in my app: I removed the basegameutils lib from my app and migrated to the new api without basegameutils. Thats it (except for some bugfixes but that can not be the cause).
I did already restart eclipse and cleaned all projects mutiple times.
The target sdk is 22 and I am using newest system images and so on for that api level (my divce is a stock nexus 6 with 5.1.1 running). I also updated my build tools to 23.0.1 from 22.0.1 and removed the 22 version. Is this the cause?
I also tried to upload the apk in the dev console and there were no erros.
Thank you for your help.
EDIT:
The logcat output says the signature does not match the previously installed version.
If i try to install the current live version via the play store there is also an error message saying i can not install this app because another user already installed an incompatible version on this device (but i dont have it installed and i dont have multiple users on the device).
If i got to the app menu in the settings my app is shown at the bottom of the list but there is a note saying the app is not installed for the users. If i click on it all buttons are unclickable (so i can not uninstall it).
What is happening?
For me, selecting Signature Version v1 and v2 both solved the problem
Your signature changed, so as you mentioned you must uninstall the previous version. You tried to uninstall from the device UI and that fails - so try it from the command-line:
adb uninstall your_package_name
Seen on Nexus devices, occasionally only command-line uninstalls work.
I found a solution but I still have no idea what caused the problem.
somewhere on my device my app was still installed even though it didnt show up in the app drawer and the play store told me the same. In the settings/apps menu my app was still present (as i mentioned in the edit of my original post) so i clicked on it. If you click on the menu button you can chose unisntall for all users which did the trick. now I can install my apk again.
I have no idea how this happened but there you go, i hope this helps.
EDIT:
I had the same problem as this guy had. the accepted answer over there is much nicer than my poorly foramtted text ;)
"You cannot install this app because another user has already installed an incompatible version on this device"
I was facing same problem And I solved it this way, For Current Updated Android Studio 2.3
Build > Generate Signed apk.
Create Keystore path.
Put Password, alias, key password.
Build type select accordingly(eg to release in playstore use release).
Signature Version select both V1 and V2 checkboxes.
Finsih.
Go to the apk from explorer and use it for your playstore or in devices as Signed and Certified apk file.
For me the solution was to disable Play Protect on device.
You can not run signed apk directly in your android device .
I you want to run your apk then follow below steps :
1) Go to your device settings
2) In setting you find applications
3) In application checked unknown sources
This will allow you to run your signed apk without downloading from play store.
or
try this link :
"You cannot install this app because another user has already installed an incompatible version on this device"
The problem is because you have a version of your testing app. So, you're not really upgrading the app! Those are two different apps. You must first uninstall previous version (testing) so you can install the release (signed) version of your app.
I encountered this problem today and tried a few suggestions here, and this is how I solved the issue: I cleared my phone's caches / junk files and also uninstalled the test versions of the app and their APKs, and then reinstalled the new APK. Try this first before getting worried. 🙂
I got the save Error just incase someone faces this. For me it was because i have multiple projects for the same app on the phone. you need to delete older versions of the app from your phone.
If you have two options (V1 (jar signature) and V2 (Full APK Signature)) before generation signed apk. you should use V1 jar signature now, because there is no backward compatibility and all android phones with version < 7 won't accept this signature. Backward compatibility will be added in some next N Developer Preview.
There are also explanations on this developer.android in this link :
https://developer.android.com/about/versions/nougat/android-7.0#apk_signature_v2
In my case it was the proguardFiles path in build.gradle that caused this problem
Currently PlayStore performs regular checks for apps and device for harmful behavior. Installing signed APK manually is treated like unusually behavior so is preventend.
So turn off play protect feature temporary and your install will work as charm!
step one - open play store and select play protect
step two - click play protection setting button
step three - disable
step four - close and install your APK manually

Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE] even if app appears to not be installed

When trying to deploy my app to the Android device I am getting the following error:
Deployment failed because of an internal error: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]
I am aware of this question but the app is not installed. It has been removed/partially removed by Visual Studio during the attempt to deploy.
In the past I solved this by downloading the app from the google play store and then removing it from settings->Application manager. However, now i am getting the error "incompatible update" when it is trying to install it.
I tried to remove it using Titanium Backup and few other things but no luck.
EDIT 1
I realised (from #Motz) that I haven't mentioned that the obvious solution doesn't work. Namely, the app doesn't appear in Settings->Apps
I've seen this several times. Usually, it's due to having a signed release version on my phone, then trying to deploy the debug version on top. It gets stuck in an invalid state where it's not fully uninstalled.
The solution that works for me is to open a command prompt and type:
adb uninstall my.package.id
That usually completes the uninstall in order for me to continue development.
No need to do an adb uninstall, just go to your settings->apps and then do uninstall from there. You will see your application grayed out.
The issues usually has to do with a release vs debug version such as #Kiliman noted here.
Uninstalling the application would be enough to avoid this problem.
INSTALL_FAILED_UPDATE_INCOMPATIBLE
but sometimes even uninstalling the message is raised again, it occurs in Android OS 5.0 +, so this is the solution:
Go to Settings > Apps and you will find your app with the message:
"Not installed for this user"
, we have to uninstall manually for all users with the option:
"Uninstall for all users"
You have to make sure the application is uninstalled.
In your phone, try going to settings/applications and show the list of all your installed applications, then make sure the application is uninstalled for all users (in my case I had uninstalled the application but still for others).
I usually face this issue on Android 5.0+ version devices. Since it has multi-user profiles accounts on the same devices. Every app will install as a separate instance for all users. Make sure to uninstall for all the users as below screenshot.
I accidentally had two devices connected.
After removing one device, INSTALL_FAILED_UPDATE_INCOMPATIBLE error has gone.
Uninstall the apk(app that you are working) from your android device and then run again.
You can just add a parameter to run, see:
Run --> Parameters
In field parameters add -cleaninstall
Now just run, they always will do a deep clean before install.
If you are using Samsung Device and by any chance marked your app for Samsung Knox, then you need to uninstall it from My Knox app.
Uninstalling just from General apps won't uninstall it from Knox App. It has to be done explicitly!
Ok uninstall the app, but we admit that the data not must be lost?
This can be resolve, upgrading versionCode and versionName and try the application in "Release" mode.
For example, this is important when we want to try the migration of our Database.
We can compare the our application on play store with actual application not release yet.
In my case. I installed the release-version app. And after uninstall the app from my device. Thing works fine.
Signature Mismatch your Previous Present APP and new APK
So Please uninstall the previous app and gradlew clean and again install apk
react-native run-android
react-native run-ios
Uninstall your app from connected device(emulator or mobile)
got terminal into project folder cd android
3 next run ./gradlew clean it clean your build
4 cd.. and run below
5 react-native run-android
the first, you must uninstall your app in emulator or device, after that you can cd ./android -> ./gradlew clean then build project again (run android or ios) -> solve
uninstall the app from emulate or smart phone and try to run again
In my case i was getting this when switched the Minimum target version of the android and when i changed back to original one (when i created project at first).
So for that uninstalling worked. But when i changed my android version to latest i was getting it again. To fix that, i went to properties of android project and in Android manifest section, i added a package name e.g com.dotnetdreamer.net. If you have already a package name then you can simply rename it to something else.
One simple way is rename your package name and run again
Delete all app files from Phone
To automate the deletion of an app on your phone you can use the steps below. It can be very useful to delete your app and app data on a quick and clean way.
Make a textfile with this code and save it as Uninstall.sh. Go to the folder (where you've put it) of this script in the terminal and do: sh Uninstall.sh YOURNAMESPACE
Now your namespacefolder (including saved appfiles and database) will be deleted.
echo "Going to platform tools $HOME/Library/Android/sdk/platform-tools"
cd $HOME/Library/Android/sdk/platform-tools
echo "uninstalling app with packagae name $1"
./adb uninstall $1
Delete all app files from pc
Make a textfile with this code and save it as DeleteBinObj.sh.
find . -iname "bin" -o -iname "obj" | xargs rm -rf
Go to the folder of your project where you place this script and do in the terminal: sh DeleteBinObj.sh
In case this helps someone,
I deployed my app to google play, when I uninstalled it and tried to run a debug on my device (new version) I was getting this failed update message.
I couldn't see the app in my device (it was already uninstalled) so I:
Installed the first version again from google play
Opened Settings/App/App name
Cleared the Data
Cleared the Cache
Uninstalled the app
Now you can deploy the debug version again to the device :)
Using Ionic with Cordova via command line...
ionic cordova run android --prod
I ran into this and found that I had deleted the release version from a previous test install, but had an old debug version that was hanging out in apps drawer that I missed. I unplugged my device from the computer, opened the app drawer and used "Search apps.." to find all instances of the app to uninstall them. Then I re-plugged in the device to the computer and viola, it worked!
Thanks for the help everyone!
I Hope this will help somebody in the future but simply go to you config.xml, inside the widget tag, change the default id(io.ionic.starter) to your own id. Have a look at this for android package naming.
Uninstalling the application from all users may be the correct solution, but also be sure to check the Secure Folder or something like that for other devices.
I spent 2 hours of my life trying to figure out the reason for the problem (I only have one user on my personal tablet)
The reason I was unable to install the application is because I mistakenly installed the application via direct link from the "Internal Testing" to both current user and my secure folders.
When you have the Secure Folder active, the tablet name appears twice: one or these is the Secure Folder. (accidentally installed on both)
Example here

Categories

Resources