Hi all,
I encounter an issue of INSTALL_FAILED_DUPLICATE_PACKAGE, when trying to deploy an apk into an emulator.
The following is the console display message:
[XXX] Installation error: INSTALL_FAILED_DUPLICATE_PACKAGE
[XXX] Please check logcat output for more details.
[XXX] Launch canceled!
However, when I check with the logcat, I saw a similar things here.
WARN/PackageManager(51): *************************************************
WARN/PackageManager(51): Application package com.xxx.xxx.xxx already installed. Skipping duplicate.
WARN/PackageManager(51): *************************************************
WARN/PackageManager(51): Package couldn't be installed in /data/app/com.xxx.xxx.xxx.apk
When I open the ddms to check with whether the package is available, it is actually not available.
What I did before this is:
Changing the android SDK location. (Window > Preferences > Android > SDK Location) Reason: Our team is customizing the android SDK, and I would like to point it into a new android SDK location instead of the default android SDK.
After changing the android SDK location from Eclipse, the Build of the particular project does not completed.
Note: I forgot the exact error, because it is not reproducible after one night. If not mistaken, the end of the compilation complains that the "aapt" in /platforms/android-7/tools is missing or could not execute. Note: Initially, it is my problem that do not set the "chmod" of the file properly. But after I change the chmod of "aapt", it is still not able to execute with same error.
Therefore, I plan to check out my changes again from svn and migrate the changes to new location. After the migration to new location. Compilation is perfect and working fine, but problem occurs when trying to deploy and run in emulator.
Tested method:
Using "ddms" to check the package, I could not see the mentioned package.
Try remove blindly using "adb" command:
./adb shell rm data/app/$APK
$APK is com.xxx.xxx.xxx.apk However, the return value is "failure"
a. Changing the android SDK back to original SDK. b. Extract a new android SDK to use. c. Get a new eclipse to use. d. Get a new Android Emulator e. Restart PC...
All the method above has been tried, but no luck. Any suggestion? Currently, I would like to know how android check the duplicate package. Anyone can shed me some light on where is the explanation of this available?
Thank you for any kinds of help.