PhoneGap Android Emulator Black Screen on Windows 7 - android

I am following the Phonegap Android getting started guide: http://docs.phonegap.com/en/2.4.0/guide_getting-started_android_index.md.html#Getting%20Started%20with%20Android
After a lot of fiddling, I have got everything running with the following versions:
Phonegap 2.4
Android SDK tools 21.1
Android SDK platform tools 16.0.1
Android SDK Platform 4.2
When I run the app in the emulator (via Eclipse), it launches but shows the flashing Android logo. If I right-click the project and run again, the console shows the app is installing and launched. However, the android logo remains.
Console log:
[2013-02-21 02:27:16 - testapp] Waiting for HOME ('android.process.acore') to be launched...
[2013-02-21 02:28:04 - testapp] ------------------------------
[2013-02-21 02:28:04 - testapp] Android Launch!
[2013-02-21 02:28:04 - testapp] adb is running normally.
[2013-02-21 02:28:04 - testapp] Performing com.rb.testapp.testapp activity launch
[2013-02-21 02:28:05 - testapp] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'test'
[2013-02-21 02:28:05 - testapp] Uploading testapp.apk onto device 'emulator-5554'
[2013-02-21 02:28:45 - testapp] Installing testapp.apk...
[2013-02-21 02:29:04 - testapp] Success!
[2013-02-21 02:29:05 - testapp] Starting activity com.rb.testapp.testapp on device emulator-5554
If I run the app from the command line /cordova/run.bat. The Emulator launches with a blank screen. The console reports the app is installed and launching.
I'm guessing there's a problem with the version of the emulator i'm running. My CPU does not support virtualisation. Is there any way to get this running?
Many thanks.

Well, I fixed this myself by installing the Android SDK 4.0 platform and using this for my emulator. Aparrently there is a fix for this (although I haven't tried this): PhoneGap not firing deviceready on Android 4.2
I have documented my setup process here: http://cookieflow.wordpress.com/2013/02/24/installing-android-4-2-sdk-and-phonegap-2-4-0-on-windows-7/

Related

An android virtual device that failed to load. click 'details' to see the error

I just installed the Android plugin in Eclipse. Created a new virtual device running on Android 4.0 API level 14 (Nexus S) but it wont emulate. I read on one post that I could move the android folder to another location so i did so and to no avail,it still wont emulate the android window will start and the 'ANDROID' text will load for days and days but does not go any further. (I usually just read but have never posted so forgive me for my format)
Examining the console this was the text available:
[2013-04-01 20:35:42 - Android Test] ------------------------------
[2013-04-01 20:35:42 - Android Test] Android Launch!
[2013-04-01 20:35:42 - Android Test] adb is running normally.
[2013-04-01 20:35:42 - Android Test] Performing com.theprogrammer.android.test.MainActivityMainActivity activity launch
[2013-04-01 20:35:43 - Android Test] Automatic Target Mode: launching new emulator with compatible AVD 'Phone_IceCreamSandwich'
[2013-04-01 20:35:43 - Android Test] Launching a new emulator with Virtual Device 'Phone_IceCreamSandwich'
[2013-04-01 20:35:55 - Android Test] New emulator found: emulator-5554
[2013-04-01 20:35:55 - Android Test] Waiting for HOME ('android.process.acore') to be launched...
[2013-04-01 20:37:12 - Android Test] HOME is up on device 'emulator-5554'
[2013-04-01 20:37:12 - Android Test] Uploading Android Test.apk onto device 'emulator-5554'
[2013-04-01 20:37:12 - Android Test] Installing Android Test.apk...
[2013-04-01 20:38:13 - Android Test] Success!
[2013-04-01 20:38:13 - Android Test] Failed to install Android Test.apk on device 'emulator-5554': device not found
[2013-04-01 20:38:13 - Android Test] com.android.ddmlib.InstallException: device not found
[2013-04-01 20:38:13 - Android Test] Launch canceled!
Here are the things you could do in this scenario:
Reinstall the ADT Android Eclipse Tools
Clean the Project
Try Manual Launch Mode in eclipse
Also, I've found these answers that may help you:
Question 1
Question 2
Take a look, see if it helps. Android is weird sometimes.
I found that patience is a virtue because the emulator will take time to boot up but it will eventually boot up just take note of the RAM size that u give it because it will actually take that from your physical memory.
EDIT
I would recommend using Genymotion as I have been using it ever since this error and it has worked quite fine for me. Migrating to another PC is also simple since you just move the virtual devices.

Application not getting installed on emulator: warning: opening audio input failed

I created a 'hello' project. I didn't change anything about the default template generated by eclipse. Then I ran the application. I didn't get any error. However, the application isn't being installed on the emulator.
environment :
windows7 x64
jdk-7u7-windows-x64
installer_r20.0.3-windows
eclipse-jee-juno-SR1-win32-x86_64
I googled many articles, but I didn't find any solutions.
[2012-10-15 16:39:42 - hello] Android Launch!
[2012-10-15 16:39:42 - hello] adb is running normally.
[2012-10-15 16:39:42 - hello] Performing com.example.hello.MainActivity activity launch
[2012-10-15 16:39:42 - hello] Automatic Target Mode: launching new emulator with compatible AVD 'AndroidAVD4.1.2'
[2012-10-15 16:39:42 - hello] Launching a new emulator with Virtual Device 'AndroidAVD4.1.2'
[2012-10-15 16:39:42 - Emulator] emulator: warning: opening audio input failed
I have read many similar article for 1 week, and I've tried
many things to fix this problem :
various android sdk version re-install
project re-creation
avd re-creation
change eclipse workspace
Changing android sdk folder to root with no space.
the re-start adb and eclipse.
As a trial, I uninstalled all anti-virus and defense software, then performed a reboot.
This solved my problem.

Android SDK's AVD does not load the Emulator at all

I'm unable to start the emulator. I can create new devices in the AVD, they appear with a little green tick next to the name, but they do not start. No emulator loads up. No error message shows up either. I've tried waiting for over 15 minutes.
The same happens when I try to load it up on eclipse. I have a test project. It compiles & tries to launch, I get the message below on the console after which nothing happens.
[2012-05-13 15:26:30 - TestApp] ------------------------------
[2012-05-13 15:26:30 - TestApp] Android Launch!
[2012-05-13 15:26:30 - TestApp] adb is running normally.
[2012-05-13 15:26:30 - TestApp] Performing com.test.testapp.TestAppActivity activity launch
[2012-05-13 15:26:30 - TestApp] Automatic Target Mode: launching new emulator with compatible AVD 'MyAVD'
[2012-05-13 15:26:30 - TestApp] Launching a new emulator with Virtual Device 'MyAVD'
Weird thing is, it used to work before I had formatted & re-installed Windows.
I don't know where I'm going wrong; I've tried searching on Google & StackOverflow to find a solution & I've tried all the solutions I found with no success.
Class Path is set. SDK installed to a location with no spaces in the path. Restarted. Re-Installed. Changed "Launch Default Activity", "Automatic Target" to "Manual". No luck. There is no running Android Device. Can anyone shed some light on this issue?
Details:
64 Bit Windows
32 Bit JDK
32 Bit Java EE Eclipse Extracted to "C:\eclipse"
Android SDK Installed to "C:\android-sdk"
PATH variable includes:
";C:\Program Files (x86)\Java\jdk1.7.0_04\bin"
";C:\android-sdk\platform-tools"
";C:\android-sdk\tools"

Hello Android works on my phone but not on Emulator

I am trying to learn about Android development. I have installed Eclipse (3.6.2) the ADT plugin (10.0.1) and the Android SDK (r11 off the official site) all are installed as 32 bit but my OS is Windows 7 64-bit.
What happens is I run my app (HelloAndroid) and the emulator and I see the main wallpaper screen but then then nothing happens! I have looked on the emulator for the app and cannot find it anywhere.
My console output is shown below...
[2011-05-20 19:14:20 - HelloAndroid] ------------------------------
[2011-05-20 19:14:20 - HelloAndroid] Android Launch!
[2011-05-20 19:14:20 - HelloAndroid] adb is running normally.
[2011-05-20 19:14:20 - HelloAndroid] Performing com.example.helloandroid.HelloAndroid activity launch
[2011-05-20 19:14:20 - HelloAndroid] Automatic Target Mode: launching new emulator with compatible AVD 'Android2.1'
[2011-05-20 19:14:20 - HelloAndroid] Launching a new emulator with Virtual Device 'Android2.1'
My AVD (Android Virtual Device) is set up as the tutorial suggests and the target is Android2.1-update1-API Level 7.
I have installed this app on my phone (HTC Hero, Android 2.1) and it works fine, but before I try and write other applications I need to get the emulator working, has anyone encountered this issue before?
I have looked online and cannot find a solution that solves my problem.
Thanks for your help in advance.
You can use adb to install your app. Find the bin directory in your eclipse workspace. There should be a YOUR_PROJECT_NAME.apk file there. To install it, from the command line, run:
adb install -r YOUR_PROJECT_NAME.apk
You will need adb in your path.
Start the emulator, switch to the logcat view in Eclipse (Window -> show view -> other ... -> logcat).
Clear the console output for logcat.
Try to deploy your application.
What does the output in logcat say? Does it display an error message?

Cannot run Android apps with eclipse on OS X 10.6

Running Eclipse 3.5.2 (Classic) in OS X 10.6.7 with the ADT plugin. I have the SDK installed and have run the SDK and AVD Manager to install all available platforms and tools. I have an AVD setup with Android 2.2 as the target API, and have configured the example 'Hello, Android' app for Android 2.1 Update 1, so compatibility should not be an issue. When I Run the application, it starts up the emulator, but gives me an error before the android startup animation appears. Here is the output in the Console window of Eclipse:
[2011-04-10 06:45:40 - HelloAndroid] ------------------------------
[2011-04-10 06:45:40 - HelloAndroid] Android Launch!
[2011-04-10 06:45:40 - HelloAndroid] adb is running normally.
[2011-04-10 06:45:40 - HelloAndroid] Performing com.twopoint7.testing.HelloAndroid activity launch
[2011-04-10 06:45:40 - HelloAndroid] Automatic Target Mode: launching new emulator with compatible AVD 'testDroid'
[2011-04-10 06:45:40 - HelloAndroid] Launching a new emulator with Virtual Device 'testDroid'
[2011-04-10 06:46:04 - Emulator] 2011-04-10 06:46:04.613 emulator[997:903] Warning once: This application, or a library it uses, is using NSQuickDrawView, which has been deprecated. Apps should cease use of QuickDraw and move to Quartz.
[2011-04-10 06:46:04 - HelloAndroid] New emulator found: emulator-5554
[2011-04-10 06:46:04 - HelloAndroid] Waiting for HOME ('android.process.acore') to be launched...
[2011-04-10 06:47:22 - HelloAndroid] emulator-5554 disconnected! Cancelling 'com.twopoint7.testing.HelloAndroid activity launch'!
Any advice on what might be going wrong would be greatly appreciated. I've found lots of posts (here and on other forums) that seem to indicate the NSQuickDrawView vs. Quartz warning seems to be a problem across the board but doesn't have a solution yet. I'm more concerned with the "emulator-5554 disconnected..." bit and the fact that I can't seem to run any apps in the emulator. Any other info I can provide which would be helpful? Any insight?
Thanks in advance for your time!
I guess you need to reset your adb after launch the emulator. In eclipse, go to window -> show view -> other -> device(under android folder).
In the device view, find and reset adb. Then run your apps.

Categories

Resources