I got Calculator source code from google's android.git.kernel.org and successfully build the project without problem. But when I launch it in eclipse, I got this
Re-installation failed due to different application signatures.
[2011-08-14 03:37:04 - JvCalculator] You must perform a full uninstall of the application. WARNING: This will remove the application data!
[2011-08-14 03:37:04 - JvCalculator] Please execute 'adb uninstall com.android.calculator2' in a shell.
[2011-08-14 03:37:04 - JvCalculator] Launch canceled!
I don't think I have the application in my emulator. So it's not uninstall/install problem, I think. I suspect that the google's source code has different signature. If so how I can change it? Is there anybody that resolved this issue? Or do I have to build a new project with copy and paste?
Note that when I tried following while connecting emulator,
adb uninstall com.android.calculator2
I got a simple one-word error message "Failure".
"How can I install Calculator (or any app) from the git repository (or from source) to any device that already has it installed?" You can't change the signature because that is a closely guarded secret at Google or (any other app developer). What you can do is change the application's package, with a different package the system will think its a different app.
I had this exact problem. Uninstalling via adb did the trick:
adb -d uninstall org.janeullah.android.healthrecords
Try making a new emulator.
Try cleaning the project.
Had same error, but I was testing the app on a device that had the app already installed (some old version). After uninstalling it worked without renaming the packages or other changes.
Related
I am trying to install apk from android studio. Initially I got below error:
So I disable instant run as suggested in many post on stackoverflow like this How To Stop Installation of Multiple Slice APK In Android Studio 2.3.
Now I am getting below error after disabling instant run:
java.io.IOException: An established connection was aborted by the
software in your host machine Error while Installing APK
I have only one instance of android studio running when I got this error.
Android studio version is 3.3.1. What can be cause of above error.
Also I am not able to install apk using adb install command. I am getting message failed to install apk with no detail message.
You can restart Android Studio : File -> Invalidate caches/restart
And i think you install ADB-Idea pluggin to uninstall or clear app data very easy with shortcut.
ADB-Idea pluggin :
Link
So I found out why I was not able to install apk from studio or from adb install command. Issue was due to my pc usb port was blocked by network administrator of our organization as my usb port usage period expired. So if anyone facing issue of not able to install apk and getting error as mentioned in question and no solution working for you than please check if your pc ports are not blocked by your organization network admin. I took approval to use usb port and it is working now.
You have got the first error because of :
You are testing your project_A on a emulator_E
As you had the app project_A, installed on the emulator_E, in previous run.
Now you started the execution of your project_A, again on the emulator_E.
The Android_Studio and emulator_E, both came to know that, the apk is already on the emulator_E, so just, whatever the new changes are, will be synchronised, within the, already available project_A apk, on the emulator_E.
But as the whole process takes some time, you uninstalled the apk of project_A on a emulator_E.
And now project_A on a emulator_E is not there, but Android_Studio tried to synchronised it, which leads you to the ERROR_1
Solution
You are following many approaches, for the same thing.
You are starting your project, project_A on the emulator_E by :-
via ADB INSTALL from the command line too
With Instant Run too
With Instant Run too
And you are not keeping the previous apk as it is there on the emulator_E, after starting the execution too.
Uninstall it from emulator_E, but before you start the execution for emulator_E. Which lead to your Android Studio to some dangerous STATE_A and, Android Studio is not tested by google for such types users
It may seem harsh, and obviously it is not the answer, but this is the exact problem, which is leading you to the such case.
I'm trying to import android applications from other computers. after sometime they're running on emulator finally now but not on the device .
probably the reason is the driver I installed , because adb devices did not recognize the device so I installed this manually and still Bluetooth Peripheral Device not installed when I check in device manager!
at first it gave me this error : the app stopped running unexpectedly !
now the error is :
Re-installation failed due to different application signatures.
You must perform a full uninstall of the application. WARNING: This will remove the application data!
Please execute 'adb uninstall com.newboston.aida.android2' in a shell.
Launch canceled!
any idea how to solve this?
I just typed adb uninstall and then the name of the package in command prompt and it works !
Uninstall the application from android device or emulator, and try to re-run / install the application. Because debug.keystrore is different for every devices.
Try to create a new virtual device. Maybe it'll work when you install the driver first. It's possible, that your phone will be recognized then. And I don't think win7 is the problem.
If possible can you just Change the Package name of the current working project. And try to Build it. it might get other path and would run. This is a kind of Patch i know, but just try it out....
I get the same problem while moving the application from one system to another... some time the problem comes due libraries path and the api level.
So you can check the api level is the same in the application buildpath in the other system.
Hope this will help you.
After
increasing the timeout period
trying kill server and start server commands
restarting avd
recreating avd
restarting the application
restarting the system
I'm still getting :
Failed to install DataAttach.apk on device 'emulator-5554': device not found
com.android.ddmlib.InstallException: device not found
Launch canceled!
What can be done in this case?
I'm running this app on Emulator (Android version 4.0)
Edit
Apps doesn't have any issues as far as code is concerned. Still they are showing error about device not found exception.
I was also getting the same error, but to my surprise the application was installed correctly and I could launch the application. I am sending this reply just to let you know guys if you want to check and see if your application was actually installed along with this error.
Using Project->clean option before run solved the problem for me.
This has to be sorted out by manually installing the apk through adb command prompt.
After navigating to tools folder from comand prompt,use
adb install DataAttach.apk
(where DataAttach refers to package name, as in my case package name is DataAttach.apk)
I have gone through the all the trick mentioned here. But it was not successfull.
After that I restarted my device and everything started working. I dont know the exact error but this trick helped me to resolve the issue.
If you're using a real device (not emulator) then try uninstalling the existing .apk from the device then re-run. This solved the error message for me.
Cleaning my project helped me to solve this problem.
Project->Clean->Run
I imported ApiDemos from android-sdk folder using File/New/Project/Android Project/Create Project Existing Samples. When I tried to run any of them, I got this error:
[2011-06-09 10:03:34 - ApiDemos] Re-installation failed due to different application signatures.
[2011-06-09 10:03:34 - ApiDemos] You must perform a full uninstall of the application. WARNING: This will remove the application data!
[2011-06-09 10:03:34 - ApiDemos] Please execute 'adb uninstall com.example.android.apis' in a shell.
What I am supposed to do ? Thank you !
Delete existing version of Api Demos from emulator. Go to Settings -> Applications -> Manage Applications click on Api Demos and uninstall it.
And then re run Api Demos.
Hope this help!!!
The error is due to the previous running of another android application. When running an Android application, Eclipse has to sign the application by the debug certificate. The existing cert is signed to the previous application and not allowed to install to the new application.
To resolve this problem, you have to uninstall the application by the adb uninstall command.
1. Open the command prompt
2. Go to the SDK directory \android-sdk\platform-tools\
3. Run the command adb uninstall com.android.packagename
4. After that, you can run the application in the Eclipse again.
This works for me like a charm!! Magic!!
I am trying to install apk file in G1 device and get following error:
Failure[INSTALL_FAILED_ALREADY_EXISTS]
I have already change the name of main file using Manifest too. change the icon too.
though the same problem is come over.
Any suggestions are welcome.
Thanks in Advance..
Sunil Mishra
Do you have some valuable application data, that prevents you from uninstalling the app, and then installing the new version?
Try the ADB command for reinstalling already existing application:
adb install -r <path to your .apk>
You have to change the name of the package, which is a lot of work with no benefit. What you should do is uninstall it. Ether choose Settings->Applications->Manage Applications and remove it from there or issue the command:
adb uninstall com.package.name
The android Manifest file has version numbers and works based on the package name not the dispayed name so I think if you update your verion numbers in the manifest, repackage and deploy then you should be able to install as an upgrade which will preserve your user data. I've done it 45 times for my app in the process of debugging.
regards,
Fin