windows-7: could not run android apps on device - android

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.

Related

Can't install app com.android.mms on android (INSTALL_FAILED_DUPLICATE_PERMISSION)

This is in the border of programming, so please delete the question if it's not correct posting it.
Question is regarding the Android 5.0 Lollipop.
Basically I've installed the "Messaging" app (com.android.mms) from inside another program (hide it pro). It's an older version of the android messaging. Then my Samsung s5 broke and I had to restore all apps into another similar Samsung. When trying to install the messaging app again (from inside or outside hide it pro) it fails with the error -505. Searching on the net I ended up by installing the android sdk and use adb to see if I could solve the issue. No luck: if I try to uninstall the app (which doesn't exist on the new phone) I get the error DELETE_FAILED_INTERNAL_ERROR.
$ adb uninstall /c/mfg/sms.apk
* daemon not running. starting it now o
* daemon started successfully *
Failure [DELETE_FAILED_INTERNAL_ERROR]
If I try to install the app via adb I get the following result:
$ adb install /c/mfg/sms.apk
3439 KB/s (2078237 bytes in 0.590s)
pkg: /data/local/tmp/sms.apk
Failure [INSTALL_FAILED_DUPLICATE_PERMISSION
perm=android.permission.MMS_SEND_OUTBOX_MSG pkg=com.android.mms]
I don't have the application on the phone, I can't put it to work and I can't get rid of the permissions. There's no way to uninstall on the phone since the app is not there and it won't let itself be installed. It doesn't appear on the Application Manager under "downloaded" or anywhere else.
My question is: is there no way to wipe out the permissions WITHOUT having the application? What I wanted was an app that allowed me to delete the permissions, regardless of having the app or not. The phone is not rooted at the moment but if needed I can root it to solve the issue if it helps. Please advise.
So I've finally found the issue. Thanks Manish and iagocanalejas for the suggestions.
It seems that something changed on the permissions system on android 5.0 (as part of one of the updates). It didn't happen before, but now if two packages from different applications ask for the same permission (in this case android.permission.MMS_SEND_OUTBOX_MSG pkg=com.android.mms), it won't let the second application install.
This behavior is new and didn't happen on previous versions of Lollipop. Flashing a newer version of the OS on my phone clearly didn't solve the issue (original was G900FXXU1BNL9 and I've finished with G900FXXU1BOD3). If anything, only made it worse since this behavior seems to have come to stay.
The solution was to root the phone, install Titanium Backup, and (after backing up everything) REMOVING with help of Titanium Backup the "Messages" application which on the Samsung replaces the standard "Messaging" android app.
Titanium backup was needed because "Messages" is considered as a system application and therefore couldn't be removed normally. No SMS messages were lost by removing "Messages". It was necessary to reboot the phone after removing "Messages" so that "Messaging" could be installed, but finally, after 2 weeks of effort, it could be done.
Have you tried to uninstall using application package? This should delete any data/cache associated with application.
$ adb uninstall com.android.mms
Install the application after this as usual:
$ adb install /c/mfg/sms.apk
Take a look on your manifest and see if u have duplicated rows

Xamarin : Application not installed issue

When I install my application in debugging mode on my Android mobile device, it seems to be installed.
However, after signing the application and publishing it, it's not installed on my phone. (Release mode)
It says: Application not installed.
I tried a few things but cannot resolve this problem. I also tested with another Keystore but it still cannot be installed.
I verified Xamarin Studio options but everything is OK, does anyone have an idea?
The correct process of creating apk is given below
First change your build type to Release from debug.
Clean
Rebuild
Right click your android project and click on archive
After successful archive click on Distribute and click on Ad-hoc
Create keystore file
After finishing click on Open Distribution
Your apk file is ready.
I know I am late in party. But I believe it could help someone to resolve his issue.
Sometimes the issue is unsupported Architecture.
You can resolve it by
Android Project>Properties>Android Options> Advance>Supported Architecture.
Here you can check the supported architecture according to your device and the issue would be resolved. (I believe app should support maximum of architectures so check them all).
Hope it would help.
For OS X and windows the commands are same:
For windows please download: MSBuild Command Prompt for VS2015
For release version (the actual problem you are facing): type in command tool:
msbuild /p:Configuration=Release Path\To\Your\ApplicationProject.csproj
If this doesn't explain your problem I would post directly on their forums or contact their support. That could also help if you could find the installation log, there is probably an explanation why it fails to install.
I found the solution here https://forums.xamarin.com/discussion/comment/72399/#Comment_72399.
The answer from Felix Alcala works perfect. No more "App not installed" messages on device.
Open the SDK Locations in Xamarin Studio
Preferences/Projects/SDK Locations/Android
and set Java SDK(JDK) to
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Finally, generate the .apk file again.
Check the target sdk when debug and check version of your android device.
Version of android device should be equal or greater than the target sdk in debugging mode.
You may encounter this issue if you have installed then uninstalled the same app from your phone.
In Visual Studio, go to
Tools > Android > Android Adb Command Prompt
Ensure your phone is connected and debugging is enabled on your phone. If this is done properly, the name of your phone should show in Visual Studio next to the run button.
In the adb command prompt, enter this command:
adb uninstall [your package name]
E.g.
adb uninstall com.mypackage
You should then be able to install your APK
This also happened to me, after downloading the .apk from my android device browser and pressing the Install button, it said "App not installed" with no further information. After downloading it several times, (each time getting the same issue) I finally got the message that I could not download de .apk because I did not have enough storage in my device. So, check if you have enough storage in your phone before trying to install it, as the error message is only "App not installed" instead of warning that there is not enough space.
Google Play scans the device for threats before installing anything from unknown source. When you try to install for the first time, it will ask if you want to install, if you let it install it'll work fine. But second time, even if it asks or not, it won't let you install. One solution for this is, go to your play store, under Play Protect disable ' scan device for security threats' and then install it, it should work! One other reason for the error could be that app is already installed in your device, uninstall the app or change the signature and then try to install it, It should work! If these don't work, try to debug through usb, adb would show you the error and then you can work on that!

Android Emulator doesnt load the App(Crash Report)

I am having a problem in running my app in Emulator. There are no errors or warnings in the code, its running perfect in device, but when it comes to emulator, it always crashes and the error message would be like this
[2012-01-16 16:13:55 - MyApp] Failed to install MyApp.apk on device 'emulator-5554!
[2012-01-16 16:13:55 - MyApp] (null)
[2012-01-16 16:13:55 - MyApp] Launch canceled!
I have tried the following things:
Run configurations > Target > Wipe user data > Run
Uninstalling the app and run it again
Restarting the emulator
adb kill-server && adb start-server
Creating a new Emulator and running the app in it
Restarting ADB
Restarting Eclipse
Starting the Eclipse after the emulator is launched completely
Increasing the ADB connection time-out to 1000
Restarting the System
Deleted the emulators and created new emulators and run in it after they are completely loaded
I don't know what else should I do. Sometimes if I run in a new Emulator the app runs for the first time and if I run it again after sometime, its the same crash report. I am not able to understand what is the problem.
Can anyone please suggest me what should I do now and where is the problem?
The Emulator used to work well before. This problem started a few days back.
Any help will be appreciated. Thanks All.
Have you defined all of your Activities correctly and completely in AndroidManifest.xml?
Can you paste the definition of your AndroidManifest.xml here?
Try that.
More possibilities:
Real refresh of AVD. It is funny, but Eclipse remembers your emulator. And if you turn it off and on it will be the same old good (or bad) one. You could reinstall all Eclipse for a real refresh. Or use a shorter, but tricky way. Change the max VM app heap size of the emulator. (Android SDK and AVD manager - Virtual device - Edit) Create it. Now you have a brand new emulator. Funny, isn't it? Now you can change the heap size back, if you wish.
Really, I think, you can maybe change any emulator parameter for the effect. Only I stumbled upon it by heap size and stuck to do it this way.
Try to repair the path.
Set the path environment variable with the path of "platform-tools" and "tools" found in the "sdk-home".
On windows(vista):- 1.Go to "Control Panel\System". 2.Select "Advanced System Settings". 3.Select the "Environment variable". 4.Set the path environment variable under the system variable with values "SDKHOME\platform-tools;SDKHOME\tools". Where "SDKHOME" is the home folder of Android sdk.
Check,if APK version of the application sits with that of the
emulator.
Try to set a longer waiting time for launch.
Increase AVD heap and SD card
Maybe, it would be good to try to recall all the changes that were done before the problem appeared?
Oh! One more: Don't you have by accident simultaneously launched emulator and connected device? If you have the same application (ssame name) on both, they could conflict in a similar way! They simply won't let each other to be launched
If nothing helps:
I was already so tired of Eclipse errors, that I have installed the IntelliJ Idea IDE, too. Now, if for the same project applications behave idself differently on both IDES, the problem is in IDE setting or emulator. If the problem is the same on both, I look for a bug in my application or the external device. Once I had a problem in OS - had to restart Linux. But in your case it is the most probable, that the problem is in AVD. I am afraid, the only variant you haven't try yet is to reinstall Eclipse. Uninstall, remove everything from the application except code, layouts and Manifest, and install Eclipse anew. Or make other Eclipse installation, with its own workshop. You can try the last version. But if the problem is in some setting, you can set it again...
Sorry, I have put here all methods I used or found.
here you can find a similar problem and the proposed accepted solution:
Honeycomb preview - can not install my app on emulator under Eclipse
I hope this helps.
This could be due to Antivirus/Firewall software installed on your PC. Have you tried to disable it?
You should also ensure that versions of Eclipse, ADT and Android SDK are up-to-date and compatible. Have you tried to contact update sites in Eclipse and in Android SDK manager? By the way, what versions of the that software do you use?
Let's go step by step.....
1º- You should try to start the emulator without the application installed.
2º- Once it is running correctly, try to install another .apk(like for example one default one....)
3º- Now, try to run the .apk. If the problem continues, try to delete the current VM and install another new one.
Can you see Emulator in "adb devices"? If yes, can you install any .apk?
If not - you have propablly something wrong with sdk
As some people have answered already partly. Make sure of a couple things which are very important specially because of the latest Android tools releases which requires.
The latest eclipse version. Yes, very very important:
http://www.eclipse.org/downloads/packages/eclipse-classic-371/indigosr1
Make sure you update the Android ADT plugin for eclipse:
http://developer.android.com/sdk/eclipse-adt.html#installing
I've encountered similar issue and that was what has helped. Restart your computer too possible?...
Use command prompt to start emulator
emulator.exe -avd google2.2 -scale 0.7 -dns-server 8.8.8.8
it may help you.
try cleaning your project or deleting the .APK file in the bin directory of your project.

install Exception device not found ANDROID

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

How to resolve different signature error

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.

Categories

Resources