I'm an android newbie having a lot of troubles with the android emulator. I have inconsistent luck in starting up the emulator, and no luck if I start it from within eclipse instead of from the commandline (it waits forever and never boots -- not even after 24 hours).
However, since I figured out how to get it to (sometimes!) start from the command line, I have a workaround to that particular problem. But I have no workaround for my latest problem. When I try to run it:
[2010-08-09 22:08:12 - MyApp] ------------------------------
[2010-08-09 22:08:12 - MyApp] Android Launch!
[2010-08-09 22:08:12 - MyApp] adb is running normally.
[2010-08-09 22:08:12 - MyApp] Performing com.android.MyApp.MyApp activity launch
[2010-08-09 22:08:12 - MyApp] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'TestDroid'
[2010-08-09 22:08:12 - MyApp] WARNING: Application does not specify an API level requirement!
[2010-08-09 22:08:12 - MyApp] Device API version is 8 (Android 2.2)
[2010-08-09 22:08:14 - MyApp] Uploading MyApp.apk onto device 'emulator-5554'
[2010-08-09 22:08:14 - MyApp] Installing MyApp.apk...
[2010-08-09 22:08:15 - MyApp] Success!
[2010-08-09 22:08:15 - MyApp] Starting activity com.android.MyApp.MyApp on device
But nothing starts on my android instance. MyApp doesn't even show up on the app list.
I assume I'm doing something wrong?
Try looking at the adb logcat output, it might show some errors. Also, does your app specify a launcher Activity?
I think I may have fixed this by (possibly) resolving my emulator startup bug.
Related
I have installed the ADT 23.04 plugin into my eclipse and Android SDK of the same version.
I am able to successfully start the AVD but when I try start the AVD a black black screen appears without and remains for many minutes without anything happening and then when I try to run the project on the AVD,I get the following error log:
[2014-12-15 23:05:53 - MyApp] ------------------------------
[2014-12-15 23:05:54 - MyApp] Android Launch!
[2014-12-15 23:05:54 - MyApp] adb is running normally.
[2014-12-15 23:05:54 - MyApp] Performing com.example.myapp.ExampleActivity activity launch
[2014-12-15 23:05:54 - MyApp] Automatic Target Mode: Preferred AVD 'Myavd2' is available on emulator 'emulator-5554'
[2014-12-15 23:05:54 - MyApp] Uploading MyApp.apk onto device 'emulator-5554'
[2014-12-15 23:05:56 - MyApp] Installing MyApp.apk...
[2014-12-15 23:06:05 - MyApp] Installation error: Unknown failure
[2014-12-15 23:06:05 - MyApp] Please check logcat output for more details.
[2014-12-15 23:06:06 - MyApp] Launch canceled!
Below is the screenshot of the AVD:
Below is the screenshot of the SDK manager:
Could someone guide me on this issue?
You have selected the Nexus-5 phone resolution for the emulator with Android-TV system-image.
So, you need to select the corresponding resolution for Android TV in Device.
Also, select the dynamic-hardware-control in Skin.
With Genymotion latest update, able to boot the Android 5.0 lollipop image but not able to connect to it from Eclipse. Not able to launch app into it.
Following is the output seen in the Console WIndow of eclipse:
[2014-11-23 02:43:13 - MyApp] ------------------------------
[2014-11-23 02:43:13 - MyApp] Android Launch!
[2014-11-23 02:43:13 - MyApp] The connection to adb is down, and a severe error has occured.
[2014-11-23 02:43:13 - MyApp] You must restart adb and Eclipse.
[2014-11-23 02:43:13 - MyApp] Please ensure that adb is correctly located at 'C:\Users\homepc\Documents\code\adt-bundle-windows-x86_64-20140321\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\adb.exe' and can be executed.
Anyone encoutered this problem and know a way to get around this? My setup is working perfectly fine when I have another Genymotion image running - like Android version 4.3 or 4.4.
INVESTIGATING ISSUE WITH MY SETUP - OLDER OS VERSIONS not working
I have not managed to install or debug an app made by me.
1.- I was unable to compile my app so I updated all packages with all the versions on them. That worked.(My app does not have errors anymore.)
2.- I tried to debug it with some virtual devices I created (and deleted several times) and get the error in console(I tried all the answers given to this, like restarting and adding time to the timeout, and all the stuff posted on similar questions):
[2014-03-06 09:46:31 - MainActivity] Launching a new emulator with Virtual Device 'android_2.2'
[2014-03-06 09:46:35 - MainActivity] New emulator found: emulator-5554
[2014-03-06 09:46:35 - MainActivity] Waiting for HOME ('android.process.acore') to be launched...
[2014-03-06 09:46:54 - MainActivity] WARNING: Application does not specify an API level requirement!
[2014-03-06 09:46:54 - MainActivity] Device API version is 8 (Android 2.2)
[2014-03-06 09:46:54 - MainActivity] HOME is up on device 'emulator-5554'
[2014-03-06 09:46:54 - MainActivity] Uploading MainActivity.apk onto device 'emulator-5554'
[2014-03-06 09:46:54 - MainActivity] Installing MainActivity.apk...
[2014-03-06 09:49:02 - MainActivity] Failed to install MainActivity.apk on device 'emulator-5554!
[2014-03-06 09:49:02 - MainActivity] (null)
[2014-03-06 09:49:02 - MainActivity] Launch canceled!
3.- I tried to push the file to the virtual device, that did not worked.
4.- After that I opted for using a real device. Here is the error:
[2014-03-06 10:09:14 - MainActivity] Android Launch!
[2014-03-06 10:09:14 - MainActivity] adb is running normally.
[2014-03-06 10:09:14 - MainActivity] Performing *.MainActivity activity launch
[2014-03-06 10:09:23 - MainActivity] WARNING: Application does not specify an API level requirement!
[2014-03-06 10:09:23 - MainActivity] Device API version is 16 (Android 4.1.2)
[2014-03-06 10:09:23 - MainActivity] Uploading MainActivity.apk onto device '****************'
[2014-03-06 10:09:23 - MainActivity] Installing MainActivity.apk...
[2014-03-06 10:09:24 - MainActivity] Installation failed due to invalid APK file!
[2014-03-06 10:09:24 - MainActivity] Please check logcat output for more details.
[2014-03-06 10:09:24 - MainActivity] Launch canceled!
5.- My last resource push the .apk file to real device. The file was transferred ok, but when I try to install it, I get this:
PARSER ERROR
There was a problem parsing the package.
My questions are, What am i doing wrong? or Is there some kind of execution time error, i am not getting?
WARNING: Application does not specify an API level requirement!
In AdnroidManifest what sdk u use
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="19" />
I was using android API 10 2.3.3 for making my application before. It was working fine. Then i converted my code to API 7 2.2.1. Now whenever i try to run the code, the virtual emulator doesn't show itself. Any ideas why this is happening?
[2012-02-29 08:57:38 - MyApp] ------------------------------
[2012-02-29 08:57:38 - MyApp] Android Launch!
[2012-02-29 08:57:38 - MyApp] adb is running normally.
[2012-02-29 08:57:38 - MyApp] Performing com.kahaf.MyApp.MyAppActivity activity launch
[2012-02-29 08:57:38 - MyApp] Automatic Target Mode: using device 'TA18801WF4'
[2012-02-29 08:57:38 - MyApp] Uploading MyApp.apk onto device 'TA18801WF4'
[2012-02-29 08:57:39 - MyApp] Installing MyApp.apk...
[2012-02-29 08:58:25 - MyApp] Success!
[2012-02-29 08:58:26 - MyApp] Starting activity com.kahaf.MyApp.MyAppActivity on device TA18801WF4
[2012-02-29 08:58:30 - MyApp] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.kahaf.MyApp/.MyAppActivity }
[2012-02-29 08:58:31 - MyApp] Attempting to connect debugger to 'com.kahaf.MyApp' on port 8622
i have tried connecting my droid too but it won't show anything either.
As per the Console info you have posted.. Looks like the app is being installed on the device rather than emulator..
As a suggestion, Go to Run Configuration and set the target as manual and then try selecting the emulator from the list.
Remove your device and run again. if that is not working try restarting eclipse.
I am working on an application which I am trying to run on 3.x or 4.x versions of android OS. It runs fine on 2.x versions. When i run the application from eclipse i see the following log:
[2012-01-10 18:46:20 - myApp] ------------------------------
[2012-01-10 18:46:20 - myApp] Android Launch!
[2012-01-10 18:46:20 - myApp] adb is running normally.
[2012-01-10 18:46:20 - myApp] Performing com.my.app.activities.SplashScreenActivity activity launch
[2012-01-10 18:48:59 - myApp] Uploading myApp.apk onto device 'emulator-5554'
[2012-01-10 18:49:04 - myApp] Installing myApp.apk...
[2012-01-10 18:51:06 - myApp] Failed to install myApp.apk on device 'emulator-5554!
[2012-01-10 18:51:06 - myApp] (null)
[2012-01-10 18:51:06 - myApp] Failed to install myApp.apk on device 'emulator-5554': device offline (x)
[2012-01-10 18:51:06 - myApp] com.android.ddmlib.InstallException: device offline (x)
[2012-01-10 18:51:06 - myApp] Launch canceled!
And it seems as if app installation is failed. But that's not case. When I check the Application section of the emulator (I mean installed apps), my app's logo is there and it runs absolutely fine from there. What was the problem it didn't run from eclipse? And it was actually installed but showed the message 'installation failed'. As I am unable to run it through eclipse so no more logs available. Please help me out of this.
Thanks in advance...!!!!
You can target a newer SDK and support older ones by including something like this in your manifest:
<uses-sdk android:minSdkVersion="7" />
<uses-sdk android:targetSdkVersion="14" />
EDIT: Explanation... http://developer.android.com/resources/dashboard/platform-versions.html
Android version - Codename - API version
Android 1.5 - Cupcake - 3
Android 1.6 - Donut - 4
Android 2.1 - Eclair - 7
Android 2.2 - Froyo - 8 Android 2.3 - Android 2.3.2 Gingerbread - 9
Android 2.3.3 - Android 2.3.7 - 10
Android 3.0 - Honeycomb - 11
Android 3.1 - 12
Android 3.2 - 13
Android 4.0 - Android 4.0.2 Ice Cream Sandwich - 14
Android 4.0.3 - 15
So you can build/compile for API 15 with <uses-sdk android:targetSdkVersion="15" />
but also support everything down to Android 1.6 by adding <uses-sdk android:minSdkVersion="3" />
Hope that makes a little more sense.