I can't able to run the android application in AVD - android

I have multiple questions to ask. I tried my best to find the solution but still confused.
1) I couldn't able to run the android app in in the avd. Whenever I click the run as android application. Its only creating multiple avd but no avd is running my app. And I couldn't find any logcat messages. In the console its displaying these errors.
[2014-04-17 09:12:42 - MyFirstApp] Android Launch!
[2014-04-17 09:12:42 - MyFirstApp] adb is running normally.
[2014-04-17 09:12:42 - MyFirstApp] Performing com.example.myfirstapp.MainActivity activity launch
[2014-04-17 09:12:42 - MyFirstApp] Automatic Target Mode: launching new emulator with compatible AVD 'MotoG'
[2014-04-17 09:12:42 - MyFirstApp] Launching a new emulator with Virtual Device 'MotoG'
[2014-04-17 09:13:47 - Emulator] WARNING: Data partition already in use. Changes will not persist!
[2014-04-17 09:13:47 - Emulator] WARNING: SD Card image already in use: C:\Users\Sanjay M\.android\avd\MotoG.avd/sdcard.img
[2014-04-17 09:13:47 - Emulator] WARNING: Cache partition already in use. Changes will not persist!
[2014-04-17 09:13:47 - Emulator] emulator: emulator window was out of view and was recentere
[2014-04-17 09:13:47 - Emulator]
2) Sometime the appcompat_v7 is not creating along with the project. Is it normal?
3) When I tried to create a Master flow activity its saying "This template requires a minimum SDK version of at least 11, and the current min version is 8" - How to update the SDK version.
Thanks a lot in advance.

Ok, For point 1 :
Well As i thinks your application Target mode is by default selected as manual.
Select Run Tab in eclipse->Select Run Configurations ->
In that select Target Tab ->Select Automatic instead of manual
Click on Apply button and now hit run.
Now your app doesn't prompt for a device.
For Point 2:
appcompat_v7 is a support library in android, so if you already have this library some where in the workspace then it would not be created each time.
for more see here .
For point 3 :
While creating the new project set the minimum sdk version to 11 in fourth one column from top.
see screen shot for help: (Note this pic only for demo, where to set minimum sdk version)

<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="19" />
add that in your manifest for setting min and target sdk

Related

android emulator doesn't display my first 'standard' helloWorld app

The standard new app HelloWorld doesn't run as it in the Android emulator.
On Apple Mac, I created an AVD : Nexus7-4.3-JellyBean ( Android 4.3 API 18 , CPU/ABI ARM(armabi-v7a) RAM 343 VM Heap 32 / Storage 200 MiB / SD Card 128 MiB)
then running HelloWorld from Eclipse ADT , I get the following in the console log ( no error stated ...)
[2013-12-07 16:11:22 - HelloWorld] ------------------------------
[2013-12-07 16:11:22 - HelloWorld] Android Launch!
[2013-12-07 16:11:22 - HelloWorld] adb is running normally.
[2013-12-07 16:11:22 - HelloWorld] Performing com.example.helloworld.MainActivity activity launch
[2013-12-07 16:11:22 - HelloWorld] Automatic Target Mode: launching new emulator with compatible AVD 'Nexus7-4.3-JellyBean'
[2013-12-07 16:11:22 - HelloWorld] Launching a new emulator with Virtual Device 'Nexus7-4.3-JellyBean'
The emulator is launched, it displays the Android log, then unlocking it with Fn F2 I get the home page and I can see the list of apps BUT HelloWorld is not there.
Why can't I see any information or at least any error?
Try resetting your adb as explained in
The Console log is not complete yet, after starting the emulator, apk installing will start then launching,
Try to manually start the emulator then run your app and choose the already running emulator and see what happen.
- I wanted to post this as a comment but it takes 50 reputation to do so :)

Android Emulator on Eclipse Not Working

I've been following the instructions found at http://developer.android.com/training/basics/firstapp/running-app.html to run the Hello World app on Eclipse's AVD, but the AVD does not launch and I get the following messages:
[2013-01-20 00:20:59 - MyFirstApp] ------------------------------
[2013-01-20 00:20:59 - MyFirstApp] Android Launch!
[2013-01-20 00:20:59 - MyFirstApp] adb is running normally.
[2013-01-20 00:20:59 - MyFirstApp] Performing com.example.myfirstapp.MainActivity activity launch
[2013-01-20 00:21:00 - MyFirstApp] Automatic Target Mode: launching new emulator with compatible AVD 'TestAVD'
[2013-01-20 00:21:00 - MyFirstApp] Launching a new emulator with Virtual Device 'TestAVD'
[2013-01-20 00:21:48 - Emulator] Failed to create Context 0x3005
[2013-01-20 00:21:48 - Emulator] emulator: WARNING: Could not initialize OpenglES emulation, using software renderer.
[2013-01-20 00:21:48 - Emulator] Failed to allocate memory: 8
[2013-01-20 00:21:48 - Emulator]
[2013-01-20 00:21:48 - Emulator] This application has requested the Runtime to terminate it in an unusual way.
[2013-01-20 00:21:48 - Emulator] Please contact the application's support team for more information.
Also, an error window popped up saying that the ARM emulator exe has stopped working. Any thoughts?
OP of this thread has similar error message,
emulator: WARNING: Could not initialize OpenglES emulation, using software renderer
Hope it helps!
Check 2 things:
That you are using 512MB of RAM (the emulator doesn't work properly
with more)
Try turning 'Host GPU' off
Try running emulator from the command line with GPU option and make sure that it is working or not.
-gpu off
Even if it result into the error, go to the eclipse, Right Click on the project and select run my projects as an "Android application". Emulator should start.
You can also give a try with enabling/disabling GPU emulation option for the selected emulator from the AVD manager.
To enable/disable GPU emulation :
Goto AVD manager -> select android virtual device -> click on Edit ->
Hardware tab -> enable/disable GPU emulation.
Hope it will work.
I got this error when trying to run an emulator with a higher resolution than I had my display set to.

Eclipse with Android SDK failure to run blank project

I have downloaded ADT Bundle with everything included http://developer.android.com/sdk/index.html. When I create Android Applicatio and I want to run I get sth like that. How to make it running.
[2012-11-21 10:18:00 - Test2] ------------------------------
[2012-11-21 10:18:00 - Test2] Android Launch!
[2012-11-21 10:18:00 - Test2] adb is running normally.
[2012-11-21 10:18:01 - Test2] Performing com.example.test2.MainActivity activity launch
[2012-11-21 10:18:01 - Test2] Automatic Target Mode: launching new emulator with compatible AVD 'Test'
[2012-11-21 10:18:01 - Test2] Launching a new emulator with Virtual Device 'Test'
[2012-11-21 10:18:01 - Emulator] WARNING: Data partition already in use. Changes will not persist!
[2012-11-21 10:18:01 - Emulator] WARNING: Cache partition already in use. Changes will not persist!
[2012-11-21 10:18:01 - Emulator] Failed to allocate memory: 8
[2012-11-21 10:18:01 - Emulator]
[2012-11-21 10:18:01 - Emulator] This application has requested the Runtime to terminate it in an unusual way.
[2012-11-21 10:18:01 - Emulator] Please contact the application's support team for more information.
While running your android app, it will loaded in new emulator. we cant able to run multiple emulator with single instance. Goto->Task Manager->adb(in running processes)->give end task->restart your eclipse and run your emulator.
Data partition already in use: This problem is based on your system RAM size and emulator ram size(allocating ram size while creating AVD) . If two emulator running in same instances,
the memory error will occur.

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.

"Hello World" failed. Something about Android Emulator went wrong

I just began to learn android. I'm using Windows XP, eclipse indigo JavaEE and its ADT. Then I was trying out the official Hello World. I've created an AVD and paste the code. But when I run the program, problem occured during AVD initialization. Here's the log:
[2011-11-15 15:53:33 - helloworld] --------------
[2011-11-15 15:53:33 - helloworld] Android Launch!
[2011-11-15 15:53:33 - helloworld] adb is running normally.
[2011-11-15 15:53:33 - helloworld] Performing com.helloworld.HelloworldActivity activity launch
[2011-11-15 15:53:33 - helloworld] Automatic Target Mode: launching new emulator with compatible AVD 'myAVD'
[2011-11-15 15:53:33 - helloworld] Launching a new emulator with Virtual Device 'myAVD'
[2011-11-15 15:53:35 - Emulator] NAND: could not write file C:\DOCUME~1\qi\LOCALS~1\Temp\\AndroidEmulator\TMP185.tmp, No space left on device
There's plenty spaces in my C:\ and I was very confused about the No space left. And the folder is empty. The number "185" changes if I press "Run" again.
I was using Android 4.0. I've tried restarting, and changing to Android 2.2. None works. I've done this "hello world" on another machine. It worked.
Open AVD manager and Edit your Emulator at which your are working on.
Wipe data and then increase the SD Card size of your Emulator which will solve the problem.
Looks like you've run out of free disk space on volume C: (either that, or the guys who commented the question are right and it's complaining about SD card size).

Categories

Resources