For me the only way was to root the phone and clear /data/data/ directory. Here are the steps:
1. Open web browser on mobile device
2. Open website: https://towelroot.com/
3. Click on lambda sign to download Towerl Root and install it afterwards
4. Open Towel root app and click on button "make it rain". If it says: "device not compatible" google other wait to root the device.
5. Download SuperSU app from Play Store
6. Download Terminal Emulator app from Play Store
7. Run Terminal Emulator
8. Type following command in terminal emulator:
9. Allow superuser access for terminal emulator
10.Type following command in terminal emulator, substitute 'package_name' with your app's package name:
rm -r /data/data/package_name
I tried all above and NADA!
the ONLY way it works for me (NON ROOTED DEVICE) was:
1.- Change on Project structure [Ctrl+Alt+Shift+S]->Flavors: the Application Id, for example: 'com.example.something' to 'com.example.somethingxx'. (which is the same as changing on the build.gradle file)
2.- Refactor package name of the project to the SAME NEW NAME you used on Application Id: 'com.example.somethingxx'
This will ensure you are installing a new App on the device... let me know!
This is because of if you have install the app with same package name. So try to remove that one.
I could only fix this by rooting. I know you don't want to do that, but it worked for me. I downloaded Titanium Backup then found my uninstalled app crossed out in the list on Titanium Backup. I couldn't get rid of that crossed out one until I went to Batch Actions then Remove orphan data. That allowed me to re-install my app and it worked well.
This worked for me:
adb install -l -r <'apk_name'>.apk
-l = forward lock
-r = reinstall
I had this exact same problem. What finally worked for me was to change the
applicationId (your package name) in
build.gradle to something different, then rebuild the project, and voilà, successful deployment.
What led to this situation was that I'd copied an existing Android Studio project into a new one, and was working off of that new one. The thing is, I'd never deployed the original apk on my device before, and was only trying to deploy the new copy of the app.
I was using a device that was just for testing, so I just reset the whole device. It worked for me anywho.
This solution worked for me:
Put your APK to the device's storage/sd card
adb shell pm install -l -r "/sdcard/<apk_filename>.apk"
-l = forward lock -r = reinstall
For no root Device you need you need to delete the app from the app list in the device:
- go to "settings"
- go to "storage"
- on third tab "downloaded apps" locate your app
- you can delete it from there
Works for me!
In my case changing the package name of the GCM signature worked. since it uninstalls the complete package.
<permission android:name="com.androidcodelab.sampleproject.permission.C2D_MESSAGE" android:protectionLevel="signature"/> <uses-permission android:name="com.androidcodelab.sampleproject.permission.C2D_MESSAGE"/>
Package name of the project changed to :
<permission android:name="com.androidcodelab.xyz.permission.C2D_MESSAGE" android:protectionLevel="signature"/> <uses-permission android:name="com.androidcodelab.xyz.permission.C2D_MESSAGE"/>
and then I reverted back to the actual package name
For android studio go to File-> Project Structure -> app -> Flavors and your right side you will see Application Id field just change Application Id and you are ready to go... :)
I can solve this like below without rooting on my Nexus 5.
- Push your app to /sdcard/
- adb push test.apk /sdcard/
- adb shell
- adb shell pm install -l /sdcard/test.apk
-l option means - pm install: installs a package to the system. Options: -l: install the package with FORWARD_LOCK.
Here are some other things to check/try that are safe to do:
- Make sure your package name is 100% unique and not colliding with another app. You could temporarily change it to test.
- Try powering your phone off and then back on to clear data caches.
- Try a soft reset for your device (which might be the same as powering off/on).
Try deleting Cached Data under
Settings -> Storage, this will clear all cached App data at once, but it does the job (in my case)
This (or some other magic) helped me:
adb shell pm clear MY_PACKAGE_NAME
This may seem odd, but my pointy-haired boss just had this issue and tried everything we could think of. Just would NOT install due to the INSTALL_FAILED_UID_CHANGED error.
He uninstalled some other apps (games) and suddenly it would install. Maybe it is an issue of disk space on internal card? Dunno, but worth a try when someone else hits it.
First time this happened I tried installing from eclipse, from command line etc.... Everything failed so I did a factory reset which then worked.
24 hours later it happened again.
Not wanting to do another factory reset, I tried all the same things again to no avail.
Lastly I tried downloading our current app from the appstore, which miraculously worked.
I then used adb to reinstall.
So if you have a version of your app in the app store, try installing that to get something on your phone, then do a reinstall "adb -d install -r $PACKAGE.apk
Hope this helps someone.
Downloading app from play store will resolve the issue. To continue development on the app, uninstall the currently installed app and just launch the app from eclipse.
It works fine.
I had the same issue in my non-rooted Nexus 5. I managed to solve it without root access nor Factory reset.
For this device, I managed to solve it by going to
Settings -> Storage -> Misc and try to delete any files related to the faulty app (in my case, an .apk that was pushed from Android Studio and a .db file). I also clicked on
Cached data to wipe the cache for all apps.
I don't know exactly which of the two things triggered the solution. You probably want to try to delete some files in
Misc before wiping the cached data, since it seems less of an overkill.
It seems to be that there were some remaining files from a previous installation which weren't wiped with the uninstall (probably an issue in the Android installation system). These files aren't accessible without root access, since they are under the /data/local/ folder. Apparently the Storage tools for the Nexus 5 have permission to delete files under that folder.
I don't know whether other devices have a similar set of storage tools.
- Android Failed to install HelloWorld.apk on device (null) Error
- Installation Failed With An Error (Eclipse)
- Eclipse installation failed with an error
- Installation error for Spring IDE in Eclipse Mars using the Eclipse market place or the install new software option
- Getting error Installation failed after generating Signed APK
- New Eclipse & Android Install - Conversion to Dalvik format failed with error 1
- Eclipse Photon Installation failed with an error
- Eclipse Installation Failed Error
- Eclipse error "ADB server didn't ACK, failed to start daemon"
- SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". error
- Error "A JNI error has occurred. Please check your installation and try again in Eclipse x86 Windows 8.1"
- Error when try install plugin
- Android Error - Open Failed ENOENT
- Error in final launch sequence Failed to execute MI command -gdb-set target-async off
- Eclipse on Mac, getting "Specified VM install not found" error when trying to build
- Installation error: INSTALL_FAILED_UID_CHANGED no root
- maven install error - only whitespace content allowed before start tag and not \u0
- INSTALL_FAILED_DEXOPT error when trying to install application
- Failed to install Android ADT
- Eclipse: MarketplaceDiscoveryStrategy failed with an error
- Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin (default-compile) on project: Fatal error compiling: tools.jar not found
- Maven for Eclipse (M2E) Installation error
- Grails 3.0.1 add in Eclipse show error Specified directory does not appear to be a Grails installation
- Failed to install *.apk on device '*': Local path doesn't exist
- Getting "No Repository Found" error in Eclipse (Ganymede) while trying to install google plugins (GWT)
- Failed to create BuildConfig class error message in eclipse
- java.lang.IllegalArgumentException: already added: Lorg/hamcrest/BaseDescription; Conversion to Dalvik format failed with error 1
- Failed to execute goal tomcat:deploy Error writing to server
- Eclipse: Conversion to Dalvik format failed with error 1
- ArtifactDescriptorException: Failed to read artifact descriptor Maven error
More Query from same tag
- How can I read a sql database backward
- How to make multiple windows in Eclipse RCP e4
- Eclipse: Automatic makefile generation not working?
- NFC Plugin for Eclipse
- Referencing to type, what is not in the build path
- How to make Eclipse's dropdown menu align left (back to normal)?
- No @Inject or default constructor found error in Spring
- SVN (Subclipse) Commited files are not updated on server
- Android Version Control and Git
- Eclipse does not suggest methods in Lambda expression
- How do you match multiple lines with dot (DOTALL) in eclipse find regex
- JBDC driver not found even though i have added it to the classpath
- no acceptable features were found on the selected site
- Tasks in Eclipse not Going Away
- jdk1.8.0_25 no javac.exe
- How to provide kotlin class for eclipse run configurations?
- How to solve my dependencies problem using Maven and slf4j with OWLAPI on Eclipse please
- How can I show JavaFX Charts in e4 SWT?
- How to use and package a JAR file with my Android app?
- Import Android APK Expansion libraries error
- eclipse - anonymous workspace loaded at first startup
- Stop Eclipse from Reloading Variable Type After Cast in Debugging
- Generate site.xml from existing update site
- Add .properties file to output folder of Flex project
- GWT + Eclipse : refresh without restarting server
- Can't figure out how to set java.library.path
- Glassfish4 and Eclipse Neon Cannot bridge runtimes
- Eclipse eye for a Visual Studio guy
- Unable to create AVD in Eclipse - clicking OK does nothing
- Recording Eclipse IDE screen? ( Windows 10 )