Installation failed since the device possibly has stale dexed jars that don't match the current version (dexopt error).
In order to proceed, you have to uninstall the existing application.
WARNING: Uninstalling will remove the application data!
Do you want to uninstall the existing application?
That's the pop-up I get when I try to run my app on the GenyMotion virtual device.
Installing com.example.engineering.app
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.example.engineering.app"
pkg: /data/local/tmp/com.example.engineering.app
Failure [INSTALL_FAILED_DEXOPT]
That's the console error message.
The odd thing is that even with a new clean "hello world" project I get the same error. It was working perfectly fine before I updated Android Studio. Something screwed up and I'm not sure what.
I've no idea what to do. I doubt it's GenyMotion related but who knows. I tried emulating a new device and reinstalling.
I presume you are running on API10 emulator. I also presume that you have tried removing the app yourself before trying to reinstall it. You are probably hitting 64k methods limit. Try running in say API19 emulator to see if you have the same issue.
Related
When I launch my virtual device ,it launches but my app doesn't show in AVD.
I update all the plugins and platforms required..after some time android studio given this error as following : Error while installing apk.
Please, solve my problem why this is happening, I'm suffering from 2 days.:(
Make sure your emulator up and running.
Also you can try running it on to your phone the process is simple,
Go to android setting=>About=>Click on build varian 7 times to become developer.
2.go to developer section and enable the debugging mode.
3.now if you are on window pc you have to download google usb driver and for MAC you can directly connect and you are good to go.
Make sure that you should uninstall all the applications that were developed by you in the emulator. After uninstalling all the applications that were build by you in the emulator, then clean project, run it again.Let me know if this works out.
Have you tried increasing the adb connection time out on the AVD?
To test this, first launch the avd and make sure it is turned on and running. Then try to build your application and install the .apk onto the device.
I have been working on a particular Android application for sometime and have been able to run these apps via Android Studio quite fine before but since applying a recent update I have not been able to run the app via Android studio because of the following error:
android.os.TransactionTooLargeException
Error: Could not access the Package Manager. Is the system running?
I have tried to troubleshoot this issue by connecting via a different TCP/IP instead of through USB (thinking it was a cable fault of sorts), reinstalling ADB, removing the ADB driver and restarting Android Studio, and all of the above yielded the same error when trying to run the app from Android Studio.
The update that was applied was the addition of the YouTube Android Player to a fragment. The fragment that contains YouTube Player was added to FragmentManager of the parent Activity during the onCreate method of this fragment. Could this be the problem? Or am I looking in the wrong place
Any insight would be appreciated.
You may have gotten this error while attempting to run an Android application on an emulator or device using Android Studio. The most common cause of this error is simple as stated in this link: You have to manually unlock your Android Virtual Device by swiping the "lock" icon on the screen. Security measures prevent the emulator from letting you connect the debugger before doing this. Make sure also that you are running Android Studio version above 0.3.2 or the latest version. There was some issue reported in AS 0.3.2. You can update it from Help >Check for update.
Found this thread which states that it might be an issue with your emulator not with Android Studio. Maybe you are trying to install application before even the emulator started properly. Wait till the home screen appears in the emulator before trying to install any application.
Also try to install any apk in Emulator from command line
Steps to install
Go to $Android_SDK_DIR\platform-tools, right click there keeping shift key pressed and Chose "Open Command Window here".
Run command adb devices to make sure yout emulator is running properly. It will show all your running emulators.
Now if emulators are showing properly, type the command adb install YOUR_FULL_APK_PATH , YOUR_FULL_APK_PATH is of any .apk
file path in your system.
You need to wait for the emulator to full start which may take a few minutes. Once it is fully started (UI on the emulator will change), it should work. You will need to restart the app after the emulator is running and choose the running emulator when prompted. You can check on this bug report the full details.
Hope this helps!
I'm not sure, but check if this works.
menu>> tools>>Android>>Enable ADB integration check it
I am just beginning to use Eclipse for Android applications. After updating my Android SDK i can't run my projects on device anymore. It says "Installing app.apk..." but nothing happens. Installing my app with adb without eclipse works, where could be an Issue? I reinstalled SDK and Eclipse twice.
Try unistalling the application from the phone before re-installing it. Also make sure you have the option to allow non-market apps checked in your phone settings --> applications.
Is it getting stuck at a particular percentage? If that is the case, the solution was to keep the virtual device running before you attempt to run the project.
I had the same problem on my computer. Android sdk on eclipse doesn't work well with windows x64.
So to launch the application you have to kill the adb process. Wait that adb restart and launch one more time.
I've looked at tons of similar questions on here but all of them either had a different issue (installing the .apk actually failed) or the solutions which worked for them have not worked for me, so I apologize if this question seems like a repost.
The issue I am having is that when I try to run an android application on an emulator in eclipse the apk never gets installed. The emulator itself works fine (all the default apps function properly, settings are correct, etc.) but the app I am trying to test is never installed onto the "phone." It never shows up in the app list or launches, and I never get a confirmation that installation completed. (The run configuration is set to launch the app)
Here is the relevant console output, with some names changed:
[2011-10-19 10:54:45 - dining-android] Android Launch!
[2011-10-19 10:54:45 - dining-android] adb is running normally.
[2011-10-19 10:54:45 - dining-android] Performing <src path>.Main activity launch
[2011-10-19 10:54:45 - dining-android] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD '1.5test'
[2011-10-19 10:54:45 - dining-android] Uploading <appname>.apk onto device 'emulator-5554'
[2011-10-19 10:54:59 - dining-android] Installing <appname>.apk...
It doesn't seem to make a difference whether I start the emulator manually and then try to run the app or if I run the app and let it start the emulator automatically, it will never go past this step. I left it running for about 8 hours (overnight) and nothing at all changed. The app is designated for the same version of android as the emulator runs, and everything looks correct in the settings of the emulator and eclipse as far as I can tell, except it never completes the installation of the app.
Does anyone know why this would happen? I've tried restarting adb, using different versions of the emulator and/or app, changing the default run configuration, and various other solutions I've come across on the internet which didn't seem to have any effect whatsoever. I'd really appreciate some help on this if anyone has run into something similar.
EDIT: I just tried using the "adb install" command in the command line on the .apk of the app while the emulator was running and it was also unsuccessful. I don't know whether this is related or another issue entirely.
EDIT2: Command line install using "adb install" functions properly. However, eclipse still can't manage to install the app. Anyone know what might cause this?
I had the same issue when I tried to run my android app in a device. Eclipse went to 100% of CPU usage and it did not respond anymore. I had to kill Java processes to close eclipse every time that I ran the app. As part of the workaround I removed android plugins from eclipse, updated my android binaries in my box and installing a fresh new eclipse . I killed adb server and restarted it several times. After all of that I had the same issue.
The solution came when I tried with another phone and voilĂ ... magically the problem was gone. I had been trying with a Samsung SIII(GTI9300 - OS 4.1.2) there was some issue with that phone because when I tried with a different phone Razor-I(XT890 - OS 4.0.4) . I used other SIII(GTI9300 - OS 4.1.2) and it worked too. Maybe the solution is not the best but was effective for me. If you have no chances to change the phone I recommend you to dig out in the configs of your phone with android binaries outside of eclipse.
I hope this helps.
I had this problem before, I don't remember how I resolved it though (it was a while ago).
I personally suggest reinstalling the sdk and the ADT plugin, and make sure you're following the steps on the developer website. I'm not sure what signing the package has to do with eclipse not installing it on your phone or the emulator -- it only needs to be signed if you're going to have it up on the market (or if you're trying to install it on non-developer mode phones).
Another thing you could try is building a new android project (like a simple hello world app) and trying to install that. If it doesn't install then you're having an issue with eclipse and/or the sdk.
Also you could just completely wipe out eclipse and the sdk, and start from scratch. (Again, follow the directions on the android developer website...)
http://developer.android.com/sdk/eclipse-adt.html
http://www.eclipse.org/downloads/packages/eclipse-ide-java-developers/indigosr1
Good luck
I was fighting with same issue today.
And thanks to eplewis89, he was suggesting right things.
For me the problem was in ADT. I've updated my ASDK to highest version and ADT started to yell about it's compability and suggested to update itself too. But I chose only some parts that I thought will be enough to develop. Really this mistake cost me half of a day.
Help -> Check for Updates and update of all ADT stuff solved the problem.
I also had this issue. I tried everything I could find on the net and none of it worked for me.
It's not the solution you want to hear, but what worked for me was abandoning my Eclipse Helios install and laying down a fresh Eclipse Indigo install and then installing Android Dev Tools.
I ran into this after a crash and there was an emulator process that was still running in the background.
The solution for me was to kill adb (using ps -ef | grep adb and kill) and any running emulators (using ps -ef | grep avd and kill). Then I restarted adb:
cd /path/to/android-sdk-linux/platform-tools
./adb start-server
Go to Android\android-sdk\platform-tools in cmd and type command logcat
Then try to install the apk on the emulator again and paste the log here
I have created a small and simple android app. I tried installing it on an actual android device. But because it won't install, I created an AVD resembling my phone. I tried copying and installing app on that AVD and it still says that error. "Application xxx could not be installed on this phone".
Before I tried installing my app on the phone or AVD I following steps:
1. Exported an unsigned copy of application onto my hard-drive.
2. User jarsigner to sign the app
3. Verified with jarsigner that my app is signed properly.
4. Used zipalign to optimize the app resources.
I do not have an icon assigned to myapp but mandatory properties like version etc. have been specified properly.
I had initially developed app using 2.1 version but because of compatability issues with my phone I reverted code to compile on 1.5 and it still doesn't get installed either on AVD or my phone.
My AVD is on 2.1 though and code is compiled with 1.5.
Is there a place where I can see the logs as to why app is not getting installed. It would be really helpful.
Cheers
This can happen if you have a Debug version installed on the device already (from a USB debug session). Either do adb -d uninstall com.example.yourapp or uninstall in the Preferences->Applications screen on the phone itself.
Try using adb install to see if you get an error.
adb logcat will give you the logs from your device (phone or emulator) so you might find a stacktrace there.