I'm trying to install com.google.android.gms v 3.0.27 on my android 4.2 emulator . But when I run adb install. it execute some minuets and the say:
INSTALLATION_FAILURE_PACKAGE_EXIST
the emulator by defualt has version 2... of this package but I want to update it. What should I do?
EDIT
I tried to uninstall. After executing command, CMD just show the help of adb unistall.
I tried to install it on another emulator, Now I get this error:
Failure [INSTALL_FAILED_SHARED_USER_INCOMPATIBLE]
This will reinstall it:
adb install -r com.google.android.gms.apk
You will have to uninstall the the old version first. You can do this with ADB:
adb uninstall com.google.android.gms
The emulator by default doesn't has those files, this is one of the reasons that Google Map API V2 doesn't work on the emulator environment. So you can just create a new AVD and install you .apk file there or use the uninstall option as mentioned.
Related
background:
1. I have installed the APK with the 1.1.30 version built by flutter.
2. I want to install it back to 1.1.29
3. I uninstall the 1.1.30 app.
4. I install the 1.1.29 package, and it will throw the error package appears to be invalid.
5. I try to use ADB to install it, but the error will change to INSTALL_FAILED_VERSION_DOWNGRADE: Package Verification Result
6. no idea why the app built by flutter will cause this issue, even if I uninstall the app fully.
7. the solution is using ADB install -r -d [path_to_debug_apk] to replace and downgrade the app.
can someone explain why this happened? is the app can not uninstall completely? thanks.
also refer to this link: Error: ADB exited with exit code 1 Failure [INSTALL_FAILED_VERSION_DOWNGRADE]
it seems the same to me who still can not install it even though the app was removed.
some information added:
I used adb shell cmd package list packages, can not find my app but the command with adb shell dumpsys package[pageckage name] can find my app.
so weird
I am trying to uninstall an old version of my app, and reinstall the new version via ADB on a Lollipop Android device. These are my current steps:
adb uninstall com.company.mypackagename
adb install app-release.apk
adb shell pm list packages
The original uninstall of my old app was successful and the app disappeared from the Android 5.5 device.
The new attempt to install the upgraded app returns:
adb install app-release.apk
Performing Push Install
app-release.apk: 1 file pushed, 0 skipped. 10.7 MB/s (822124 bytes in 0.073s)
pkg: /data/local/tmp/app-release.apk
Success
but when I run a list of the packages, my new APK package is not there.
adb shell pm list packages
When I try to run it anyway:
adb shell am start -n "com.company.mypackagename/com.company.mypackagename.MainActivity"
I get:
Error: Activity class {com.company.mypackagename/com.company.mypackagename.MainActivity} does not exist.
So obviously it is not installing correctly, as it is not showing in packages and unable to run - even though it shows Success. What is the best way to troubleshoot this? Any help appreciated!
I finally found the issue!!!
I'm posting here because I spent way too much time trying to figure this out, since it wasn't giving me any error messages.
I was able to get a copy of the original APK from the deployment team and analyze their AndroidManifest.xml, and saw that the original APK package name was all lowercase: "com.company.mypackagename" but the one I was building was actually using Camel-Case "com.company.myPackageName". When I tried to install it, ADB should have given an error similar to: "Application ID Does not Match", but instead it just repeatedly gave me a response of: "Success".
Hopefully this saves someone else some time!
I'm getting this error when i'm lunching my app:
Installation failed with message INSTALL_FAILED_UID_CHANGED.
It is possible that this issue is resolved by uninstalling an existin
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?
I clicked 'OK' but then i'm getting this log message:
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.team.saver.app"
pkg: /data/local/tmp/com.team.saver.app
Failure [INSTALL_FAILED_UID_CHANGED]
DEVICE SHELL COMMAND: pm uninstall com.team.saver.app
Unknown failure (Failure)
i'v managed to overcome it by replacing the appId, but i need to keep the current app id and not replaced it.
i also tried deleting the package with adb and did not got response at all from the shell:
adb shell rm -rf com.team.saver.app
also tried to restart the device
But still cant find a solution, any help would be great, thanx!
Try to install android studio with proper installation of jdk .It will not generate errors if all paths are set ok.
Change you Old SDK version to latest upgrade version and then clean the project and run it again. It may solve the problem .
I try installing my app for the first time on a Nexus 5.
The android studio then tells me I need to uninstall my app inorder to install it (The app never exsited on the phone) and then asks me to unistall the app, I agree and he tries to unistall but an error occurs:
Waiting for device.
Target device: lge-nexus_5-08a9df88021f8ec8
Uploading file
local path: D:\USER\Desktop\Yoav\AndroidProject\Example\app\build\outputs\apk\app-debug.apk
remote path: /data/local/tmp/com.example.user.example
Installing com.example.user.example
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.example.user.example"
pkg: /data/local/tmp/com.example.user.example
Failure [INSTALL_FAILED_DEXOPT]
At this part the studio asks me to uninstall after pressing ok:
DEVICE SHELL COMMAND: pm uninstall com.example.user.example
Unknown failure
I think it's because the app does not exsit on the phone, but if the app does not exsit why does it even want me to delete it?
It might be because of the package name. Check weather is there any app with the same package name that you created before. com.example is not a good practice to use for you practice projects even.
I may be not right but from the information provided this is what I can say.
It happenes because the .apk you built and are trying to install is missing the classes.dex file. This can happen for various reasons but most of the time (for me) the build process gets stuck somehow.
Open Task Manager and kill all following processes:
cmd.exe
conhost.exe
find_java.exe
Then clean and build your project.
Also make sure you use latest Build tools (now 21.1.1).
I had the same problem. I finally had to reboot the device to solve it.
I hav created Calcy app in Eclipse. It is running in Emulator properly.
But i want to run it using AVD manager .
the command for installing the app is "adb install Calcy.apk"
but it is giving the message that
C:\Android\android-sdk\platform-tools>adb install Calcy.apk
252 KB/s (39547 bytes in 0.153s)
pkg: /data/local/tmp/Calcy.apk
Failure [INSTALL_FAILED_ALREADY_EXISTS]
How to resolve this...
If you do not want to uninstall first using adb uninstall your.package.name, then try adb install -r Calcy.apk
Please first remove this app from Emulator then run "adb install Calcy.apk"
Failure [INSTALL_FAILED_ALREADY_EXISTS]
this means the app already installed in the emulator. You can go into Application manager tool and uninstall app from emulator. then again run this command and you will be able to install it.
You need to uninstall the already installed app. then this command will work
you can also remove app with below command
adb uninstall package_name