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
Related
Windows 10 (64 bit).
My emulator is locate on folder :
d:\Programs\Android\avd.android\avd\Nexus_4_4.avd\
My apk is locate on folder:
d:\Programs\Android\apk\my_apk.apk
I'm locate on folder D:\temp
If I want to start emulator from command line (prompt) I use the next command:
emulator -avd exus_4_4.avd
It's work fine. Emulator is success launched.
But I need more. Only from command line:
Launch emulator
Deploy d:\Programs\Android\apk\my_apk.apk to started emulator
Run apk on emulator
How I can do this from command line?
To install a .apk file you need follow the below steps
Open the command prompt inside d:\Programs\Android\apk\
Type adb install my_apk.apk and press Enter.
If the app is already installed in the device then use adb install -r FileName.apk
Check Android developer site for this kind of information.
https://developer.android.com/studio/build/building-cmdline.html
Install
adb install path/to/your_app.apk
and install with run
adb -d install path/to/your_app.apk
Running cordova emulate android gives the following error-
Error: Failed to install apk to emulator: Error executing "adb -s emulator-5554 install -r "C:/work/projects/cordova/projectName/platforms/android/build/outputs/apk/android-debug.apk"":
The error message is not actually correct because the new apk is deployed to the emulator (i have performed minor changes and the apk is updated on emulator), but the app is not started.
When I manually run the adb command that is shown in the error message i get a windows dialog saying that adb.exe has stopped responding. No error msg on the command line. Although the app on the emulator has again updated (so installation is working) and can be manually run from the emulator.
When I copy adb version 1.0.31 (exe and two dlls) over the top of version 1.0.32 in \platform-tools it all runs as expected- loads apk and starts app, no errors, regardless of whether i use cordova commands or adb command directly.
Has anyone had this issue with adb1.0.32 and or have a work solution? I have a workaround which is to use 1.0.31, but I would like to know what the issue is.
I'm working on an app that uses device admin. If I run the app on a device using eclipse, then make a minor change to the code, then run the app again, the app runs as you'd expect with the new change.
However, if the second time I run the app I use adb install I get:
Failure [INSTALL_FAILED_ALREADY_EXISTS]
If I try to uninstall then reinstall, the uninstall fails because the app is device admin. This has led me to wonder which adb commands eclipse executes when you select run. I've looked for some sort of "update" command but I couldn't find one. Anyone know?
You can use "adb install -r yourapp.apk" to install your system apk again.
If you want to run through command line, use
"adb shell am start -n acticityname_withpackage"
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.
After I clicked run it shown as below
[2011-02-23 22:12:06 - cas1] Uploading cas1.apk onto device '100082d63935'
[2011-02-23 22:12:15 - cas1] Failed to install cas1.apk on device '100082d63935': timeout
[2011-02-23 22:12:15 - cas1] Launch canceled!
Please help me solve this problem
Is it an actual device or emulator? Is the app already installed from the market? If you should uninstall the market version. If its the emulator, that happens to me occasionally and restarting the emulator and waiting until the home screen appears usually fixes it.
Try issuing the command "adb kill-server" from the command line and then "adb devices" to start it back up again. Then try to deploy your apk again. I've had issues deploying to the Honeycomb emulator from Eclipse and the above fixed it.
Finally, if this doesn't work try installing the apk from the command line using adb install -r [your_apk].