HelloAndroid Program - android

I'm new to android sdk. I started with the HelloAndroid program. I followed all specified instructions, but to my surprise, the emulator is not diplaying the "Hello Android" text.
Instead the emulator looks like the one shown above(You can see "LogCat" at the bottom of the image).
The Console shows msgs like,
[2010-10-28 20:14:59 - HelloAndroid] New emulator found: emulator-5554
[2010-10-28 20:14:59 - HelloAndroid] Waiting for HOME ('android.process.acore') to be launched...
[2010-10-28 20:15:34 - HelloAndroid] HOME is up on device 'emulator-5554'
[2010-10-28 20:15:34 - HelloAndroid] Uploading HelloAndroid.apk onto device 'emulator-5554'
[2010-10-28 20:15:35 - HelloAndroid] Installing HelloAndroid.apk...
[2010-10-28 20:16:13 - HelloAndroid] Success!
[2010-10-28 20:16:13 - HelloAndroid] Starting activity com.example.helloandroid.HelloAndroid on device
[2010-10-28 20:16:18 - HelloAndroid] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example.helloandroid/.HelloAndroid }
After some 7 min, "request time failed" error message is thrown in "LogCat".
Can someone help, please? Thanks.

You need to "unlock" the emulator. Click and drag the green lock symbol to the right.
What your seeing is the screen that would appear if you had a physical android device and you pushed the power button to turn the screen on after the device had gone to sleep.

If you launching the emulator for the first time, you have to unlock it, just like how you unlock your android phone ( using the mouse instead ).

Related

Failed to install *.apk on device 'emulator-5554' error

[2015-01-21 14:27:38 - FirstAndroidProject] Launching a new emulator with Virtual Device 'Android_5.0.1'
[2015-01-21 14:27:51 - FirstAndroidProject] New emulator found: emulator-5554
[2015-01-21 14:27:51 - FirstAndroidProject] Waiting for HOME ('android.process.acore') to be launched...
[2015-01-21 14:30:52 - FirstAndroidProject] HOME is up on device 'emulator-5554'
[2015-01-21 14:30:52 - FirstAndroidProject] Uploading FirstAndroidProject.apk onto device 'emulator-5554'
[2015-01-21 14:30:53 - FirstAndroidProject] Installing FirstAndroidProject.apk...
[2015-01-21 14:33:00 - FirstAndroidProject] Failed to install FirstAndroidProject.apk on device 'emulator-5554!
[2015-01-21 14:33:00 - FirstAndroidProject] (null)
[2015-01-21 14:33:01 - FirstAndroidProject] Launch canceled!
This is my very first Android app. I tried every possible way explained in solutions provided in stackoverflow.com but every time I launched the app I get the above error in the console.
But on every time I opened the icon in the menu list in the emulator after the above message is displayed, the app opens successfully. What is actually meant by the above error?
Kill your adb manually in the your processes after close the emulator, restart your eclipse..
Clean your project and restart the emulator. Then, try launching the app again.

Android AVD never starts up

I just barely installed Android SDK with all the requirements needed to test and develop on it, but there is one problem. Compiling and building the apps works fine, but when I press the run button. This happens.
The emulator is just a black screen with a keyboard.
And this is what the log outputted:
[2012-05-28 16:04:35 - RedstoneCraft] ------------------------------
[2012-05-28 16:04:35 - RedstoneCraft] Android Launch!
[2012-05-28 16:04:35 - RedstoneCraft] adb is running normally.
[2012-05-28 16:04:35 - RedstoneCraft] Performing mx.x10.redstonecraft.app.RedstoneCraftActivity activity launch
[2012-05-28 16:04:35 - RedstoneCraft] Automatic Target Mode: launching new emulator withh compatible AVD 'Android'
[2012-05-28 16:04:35 - RedstoneCraft] Launching a new emulator with Virtual Device 'Android'
[2012-05-28 16:04:49 - RedstoneCraft] New emulator found: emulator-5554
[2012-05-28 16:04:49 - RedstoneCraft] Waiting for HOME ('android.process.acore') to be launched...
[2012-05-28 16:06:05 - RedstoneCraft] emulator-5554 disconnected! Cancelling 'mx.x10.redstonecraft.app.RedstoneCraftActivity activity launch'!
And then when it says emulator-5554 disconnected, thats when the android screen pops up but stays there until I close the emulator. I've tried everything but still no help. :(
Just close the emulator and restart again. Even though you get" emulator-5554 disconnected! Cancelling 'mx.x10.redstonecraft.app.RedstoneCraftActivity activity launch'!" just try closing the emulator and restarting again. It works.

Problems launching a virtual machine using the android avd manager [duplicate]

I have installed and set up Eclipse and the plugin ADT in order to work with Android SDK. So far so good. But when I try to launch a VM(virtual Machine) for any android platform that I choose (for example: android 3.2) I just get the skin launched together with a keyboard console and phone buttons, it seems to boot up to a state and then does nothing but displays the android logo on the main vm screen and that's all it does - no more!, no VM functionality!, what's going on? Have I missed out some step? Please help...
Have been waiting sometimes over 10 mins in each case for the emulator to start.
I launched/ran an Android project test sample; 'hello world' from the eclipse environment after installing the ADT plugin for Android These are the error messages I had displayed in the console ddms:
[2012-04-30 14:31:20 - HelloAndroid]
[2012-04-30 14:31:20 - HelloAndroid] Android Launch!
[2012-04-30 14:31:20 - HelloAndroid] adb is running normally.
[2012-04-30 14:31:20
- HelloAndroid] Performing com.example.helloandroid.HelloAndroidActivity activity launch
[2012-04-30 14:31:20 - HelloAndroid] Automatic Target Mode: launching
new emulator with compatible AVD
'leighs_basic_hardware_secound_virtual_device'
[2012-04-30 14:31:20 -
HelloAndroid] Launching a new emulator with Virtual Device
'leighs_basic_hardware_secound_virtual_device'
[2012-04-30 14:31:40 -
Emulator] Warning: No DNS servers found
[2012-04-30 14:31:52 -
Emulator] emulator: emulator window was out of view and was recentered
[2012-04-30 14:31:52 - Emulator]
[2012-04-30 14:31:53 - HelloAndroid]
New emulator found: emulator-5554
[2012-04-30 14:31:53 - HelloAndroid]
Waiting for HOME ('android.process.acore') to be launched...
[2012-04-30 14:49:03 - HelloAndroid] HOME is up on device
'emulator-5554' [2012-04-30 14:49:03 - HelloAndroid] Uploading
HelloAndroid.apk onto device 'emulator-5554'
[2012-04-30 14:49:03 -
HelloAndroid] Installing HelloAndroid.apk...
[2012-04-30 14:51:38 -
HelloAndroid] Failed to install HelloAndroid.apk on device
'emulator-5554!
[2012-04-30 14:51:38 - HelloAndroid] (null)
[2012-04-30 14:51:39 - HelloAndroid] Launch canceled!
At no point have I have anything but the Android logo displayed on my emulator. I have tried various platform emulators - none of them are performing!
A second lot of errors I received back on a test run after I checked the user data wiped in the Run configuration menu was: result
: [2012-04-30 17:20:27 - Emulator] Failed to allocate memory: 1455
[2012-04-30 17:20:27 - Emulator]
[2012-04-30 17:20:27 - Emulator] This
application has requested the Runtime to terminate it in an unusual
way.
[2012-04-30 17:20:27 - Emulator] Please contact the application's
support team for more information.
Bench mark results of my computer using Novabench incase anyone wants to check, are:
30/04/2012 17:45:59 Microsoft Windows 7 Starter Intel Atom N550
1.50GHz # 1500 MHz Graphics Card: Intel(R) Graphics Media Accelerator 3150
1014 MB System RAM (Score: 78) - RAM Speed: 1610 MB/s
CPU Tests (Score: 70) - Floating Point Operations/Second: 24110532 -
Integer Operations/Second: 43813828 - MD5 Hashes Generated/Second:
159380
Graphics Tests (Score: 1) - 3D Frames Per Second: 3
Hardware Tests (Score: 6) - Primary Partition Capacity: 87 GB - Drive
Write Speed: 14 MB/s
Do you Run your project or only start an emulator? After starting emulator, click Run button and select "Run as Android project".
I am not sure how long you waited, but starting the emulator the first time (before you have a snapshot) can take quite a long time. Depending on you hardware it can take more than 10 minutes to launch.
I had a similar issue which was solved by creating a new emulator and running it. You can check progress in Devices view through DDMS. Sometimes, this problem may occur when a snapshot enabled emulator hangs because of error, which can be solved by starting the emulator with user data wiped.
Emulator thread automatically cuts off if for some time you have not done any activity on it..
so.. keep running your app to keep emulator on LIVE!
My advice - if you having an android phone.. please usb debug it and Debug your application on your phone... You will feel relieved from the long durations of the emulator........ to run!! :)

hello world fails to show up in emulator

I followed Hello World tutorial exactly. Emulator comes up but fails to show Hello World text. Here's the log info:
[2011-11-26 20:06:57 - HelloAndroid] Android Launch!
[2011-11-26 20:06:57 - HelloAndroid] adb is running normally.
[2011-11-26 20:06:57 - HelloAndroid] Performing com.example.helloandroid.HelloAndroid activity launch
[2011-11-26 20:06:57 - HelloAndroid] Automatic Target Mode: launching new emulator with compatible AVD 'AndroidPhone'
[2011-11-26 20:06:57 - HelloAndroid] Launching a new emulator with Virtual Device 'AndroidPhone'
[2011-11-26 20:07:09 - HelloAndroid] New emulator found: emulator-5554
[2011-11-26 20:07:09 - HelloAndroid] Waiting for HOME ('android.process.acore') to be launched...
[2011-11-26 20:45:37 - HelloAndroid] HOME is up on device 'emulator-5554'
[2011-11-26 20:45:37 - HelloAndroid] Uploading HelloAndroid.apk onto device 'emulator-5554'
[2011-11-26 20:45:38 - HelloAndroid] Installing HelloAndroid.apk...
After about 1/2 hour, this shows up in the log...
[2011-11-26 20:48:59 - HelloAndroid] Failed to install HelloAndroid.apk on device 'emulator-5554!
[2011-11-26 20:48:59 - HelloAndroid] (null)
[2011-11-26 20:49:02 - HelloAndroid] Launch canceled!
I’ve read posts on similar problem. I’ve tried many suggested solutions including restarting Eclipse, rebooting and restarting eclipse, creating a new project in eclipse, starting emulator first with “wipe user data” box checked, increasing the emulator time-out period from 5000 to 20000, unlocking emulator by clicking and dragging mouse, clicking Menu and Home buttons on emulator, and running the Layout version. Nothing worked. I’m using Android 4.0 AVD and Eclipse Build id: 20110916-0149 and the latest JDC on a Dell Inspiron 1501 laptop.
It’s hard to believe Google would make this discouraging example as the first impression new users experience. Hopefully someone can help.
When you have the "Failed to install HelloAndroid.apk on device 'emulator-5554!", try to wait some seconds,
dont close the VM and
reclick on "Launch Buton"
When you create a new Activity project, it effectively creates a Hello World app. Create a new project. Don't modify it. Just run it. If you don't see a Hello world message, check your install.

Failed to install HelloAndroid.apk on device 'emulator-5554!

Ive seen the questions posted about this issue. I understand it takes several minutes for the emulator to configure itself and launch. But if Im getting the specific error:
[2011-05-13 08:41:36 - HelloAndroid] ------------------------------
[2011-05-13 08:41:36 - HelloAndroid] Android Launch!
[2011-05-13 08:41:36 - HelloAndroid] adb is running normally.
[2011-05-13 08:41:36 - HelloAndroid] Performing com.santiapps.helloandroid.HelloAndroid activity launch
[2011-05-13 08:41:36 - HelloAndroid] Automatic Target Mode: launching new emulator with compatible AVD 'my_avd'
[2011-05-13 08:41:36 - HelloAndroid] Launching a new emulator with Virtual Device 'my_avd'
[2011-05-13 08:41:49 - Emulator] 2011-05-13 08:41:49.650 emulator[411: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-05-13 08:41:50 - Emulator] emulator: emulator window was out of view and was recentred
[2011-05-13 08:41:50 - Emulator]
[2011-05-13 08:41:50 - HelloAndroid] New emulator found: emulator-5554
[2011-05-13 08:41:50 - HelloAndroid] Waiting for HOME ('android.process.acore') to be launched...
[2011-05-13 08:44:33 - HelloAndroid] WARNING: Application does not specify an API level requirement!
[2011-05-13 08:44:33 - HelloAndroid] Device API version is 12 (Android 3.1)
[2011-05-13 08:44:33 - HelloAndroid] HOME is up on device 'emulator-5554'
[2011-05-13 08:44:33 - HelloAndroid] Uploading HelloAndroid.apk onto device 'emulator-5554'
[2011-05-13 08:44:34 - HelloAndroid] Installing HelloAndroid.apk...
[2011-05-13 08:47:20 - HelloAndroid] Failed to install HelloAndroid.apk on device 'emulator-5554!
[2011-05-13 08:47:20 - HelloAndroid] (null)
[2011-05-13 08:47:22 - HelloAndroid] Launch canceled!
[2011-05-13 08:53:55 - HelloAndroid] ------------------------------
[2011-05-13 08:53:55 - HelloAndroid] Android Launch!
[2011-05-13 08:53:55 - HelloAndroid] adb is running normally.
[2011-05-13 08:53:55 - HelloAndroid] Performing com.santiapps.helloandroid.HelloAndroid activity launch
[2011-05-13 08:53:55 - HelloAndroid] Automatic Target Mode: launching new emulator with compatible AVD 'my_avd'
[2011-05-13 08:53:55 - HelloAndroid] Launching a new emulator with Virtual Device 'my_avd'
[2011-05-13 08:54:06 - Emulator] 2011-05-13 08:54:06.327 emulator[460: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-05-13 08:54:06 - Emulator] emulator: emulator window was out of view and was recentred
[2011-05-13 08:54:06 - Emulator]
[2011-05-13 08:54:06 - HelloAndroid] New emulator found: emulator-5554
[2011-05-13 08:54:06 - HelloAndroid] Waiting for HOME ('android.process.acore') to be launched...
[2011-05-13 09:08:07 - Emulator] emulator: ERROR: unexpected qemud char. channel close
couldnt it be I have a bad configuration...?
wait for the emulator to setup completely and then test your app. Also, I would leave you AVD open so you dont have to wait so long everytime you run your application.
When it shows the red writing, don't close anything - leave it there and then press the run button again. Worked like a charm.
I was facing the same problem but i tried changing the ADB connection timeout. I think it defaults that to 5000ms and I changed mine to 10000ms to get rid of that problem. If you are in Eclipse, you can do this by going through Window -> Preferences and then it is in DDMS under Android.
Try this: create another emulator in AVD Manager and try to run your application in the new emulator.
Hope this might help you
You may need to increase the device ram size. For some Honeycomb AVDs at least, the default of 256 is insufficient, and caused me the same problem. Try at least 512.
Go to window and preference and increase the ADB connection time out(ms) which is 500 by default. Also change the base local debugger port to more than 9000 in my case it worked.
See Related post
This worked on Linux for me:
Run Emulator (Wait for the home screen of the Emulator to load)
Click Window > Open Perspective > DDMS
In Devices Panel, click on drop down menu > Reset adb
Run project
Valen answer is correct although its nice to know when to start running the app and when is not ok to start the app.Open the devices perspective. The next time you want to run an app first open the 'Android virtual device Manager' and run your avd then click on the device perspective and watch your emulator processes one by one firing up.. as soon this is done (its not fast you have to wait .. but at least you have some idea of whats going on .... a progress bar would be ideal for this place), click on your project and run as android app. On the devices perspective one more process will appear with the name of the package of your app. As soon as this happen your app is running on the device and it can be tested.
I have noticed this error when the emulator has not loaded fully, "android" is flashing on your screen. In other words, it is not yet ready for the application to be installed.
Just wait till you see that the emulator is fully ready, meaning the "android" has vanished and the device screen is visible on the emulator. Now run it and the application loads smoothly.
Restart ADB server from DMOZ
or refer to this tutorial How to solve Failed to install .apk

Categories

Resources