Android Runtime Errorr - android

I am beginner android developer:)I dowland android sdk completely from 2.0 version to 4.2.I created a new project and added some buttons,checkboxs then I tried to run my first project and got a error like that:
[2012-12-25 00:09:13 - aaa]
[2012-12-25 00:09:13 - aaa] Android Launch!
[2012-12-25 00:09:13 - aaa] adb is running normally.
[2012-12-25 00:09:13 - aaa] Performing com.example.xxx.MainActivity activity launch
[2012-12-25 00:09:13 - aaa] Automatic Target Mode: launching new emulator with compatible AVD 'AVD_for_Galaxy_Nexus_by_Google'
[2012-12-25 00:09:13 - aaa] Launching a new emulator with Virtual Device 'AVD_for_Galaxy_Nexus_by_Google'
[2012-12-25 00:09:14 - Emulator] WARNING: Data partition already in use. Changes will not persist!
[2012-12-25 00:09:14 - Emulator] WARNING: Cache partition already in use. Changes will not persist!
[2012-12-25 00:09:14 - Emulator] Failed to allocate memory: 8
[2012-12-25 00:09:14 - Emulator]
[2012-12-25 00:09:14 - Emulator] This application has requested the Runtime to terminate it in an unusual way.
[2012-12-25 00:09:14 - Emulator] Please contact the application's support team for more information.
How can I solve this error?

That sometimes happen for specific emulator density settings. Try with a different emulator, tweak its settings until you get it working.

I got same error...
Solution
change hw.ramSize to 1024MB in config.ini file under
$User>.android>avd>name_of_avd> config.ini
It works fine

Related

Failed to allocate memory: 8 android

i have installed eclipse and android sdk manager, installed files for android 4.22 in sdk and tried to run a sample android project.. but am getting the following error
[2014-02-06 15:28:08 - myFirstApp] Android Launch!
[2014-02-06 15:28:08 - myFirstApp] adb is running normally.
[2014-02-06 15:28:08 - myFirstApp] Performing com.example.myfirstapp.MainActivity activity launch
[2014-02-06 15:28:08 - myFirstApp] Automatic Target Mode: launching new emulator with compatible AVD 'AVD_233'
[2014-02-06 15:28:08 - myFirstApp] Launching a new emulator with Virtual Device 'AVD_233'
[2014-02-06 15:28:17 - Emulator] Failed to allocate memory: 8
[2014-02-06 15:28:17 - Emulator]
[2014-02-06 15:28:17 - Emulator] This application has requested the Runtime to terminate it in an unusual way.
[2014-02-06 15:28:17 - Emulator] Please contact the application's support team for more information.
i tried the following..
1) accessed C:\Users\user\.android\avd\user.avd\config.ini and changed hw.ramSize=1024MB
2)accessed avd and edited memory optionfrom 1024mb s to 512mb
its still not working... thanks in advance..
Try setting your RAM to 512 MB. It Worked for me..
If it is not working for you, Try reducing your RAM and VM heap further.
First try your emulator with some LDPI models(2.7 inch)..

OpenGL does not work in VMware?

I am new to Android, and am just starting to work through the examples in "Learn Android App Development". When I try to "run as Android application", I get the following errors...
[2013-10-12 19:39:18 - Hello_World] ------------------------------
[2013-10-12 19:39:18 - Hello_World] Android Launch!
[2013-10-12 19:39:18 - Hello_World] adb is running normally.
[2013-10-12 19:39:18 - Hello_World] Performing chapter.two.hello_world.MainActivity activity launch
[2013-10-12 19:39:19 - Hello_World] Automatic Target Mode: launching new emulator with compatible AVD 'Android_4.2_Emulator_Nexus_7'
[2013-10-12 19:39:19 - Hello_World] Launching a new emulator with Virtual Device 'Android_4.2_Emulator_Nexus_7'
[2013-10-12 19:39:27 - Emulator] extension WGL_ARB_make_current_read was not found
[2013-10-12 19:39:27 - Emulator] extension WGL_EXT_swap_control was not found
[2013-10-12 19:39:27 - Emulator] Failed to create pbuf surface for FB 0x3004
[2013-10-12 19:39:27 - Emulator] emulator: WARNING: Could not initialize OpenglES emulation, using software renderer.
[2013-10-12 19:39:29 - Emulator] emulator: warning: opening audio output failed
[2013-10-12 19:39:29 - Emulator]
[2013-10-12 19:39:33 - Emulator] emulator: emulator window was out of view and was recentered
[2013-10-12 19:39:33 - Emulator]
[2013-10-12 19:39:33 - Hello_World] New emulator found: emulator-5554
[2013-10-12 19:39:33 - Hello_World] Waiting for HOME ('android.process.acore') to be launched...
[2013-10-12 19:40:57 - Hello_World] emulator-5554 disconnected! Cancelling 'chapter.two.hello_world.MainActivity activity launch'!
The two lines with "not found" at the end, and the very last line are actually in red ink.
Being brand new to Android development, I am not sure where the error is actually coming from. Is it related to the fact that I am doing this on a Windows 7 x64 VMware VM, is it related to the host system (also a Windows 7 x64 system), is it related to the graphics card and its software, OpenGL, position of Mars in relationship to Venus, screen resolution, etc.??? My hardware is a HP pavilion AMD three Core processor.

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.

emulator not running

I have created one application related to maps using api 16 as soon as run this application this errors pops out.
[2012-10-18 20:05:26 - Maps] Android Launch!
[2012-10-18 20:05:26 - Maps] adb is running normally.
[2012-10-18 20:05:26 - Maps] Performing com.example.maps.MainActivity activity launch
[2012-10-18 20:05:29 - Maps] Launching a new emulator with Virtual Device 'andi'
[2012-10-18 20:05:38 - Emulator] could not get wglGetExtensionsStringARB
[2012-10-18 20:05:38 - Emulator] could not get wglGetExtensionsStringARB
[2012-10-18 20:05:38 - Emulator] could not get wglGetExtensionsStringARB
[2012-10-18 20:05:38 - Emulator] could not get wglGetExtensionsStringARB
[2012-10-18 20:05:38 - Emulator] could not get wglGetExtensionsStringARB
[2012-10-18 20:05:38 - Emulator] could not get wglGetExtensionsStringARB
[2012-10-18 20:05:38 - Emulator] could not get wglGetExtensionsStringARB
[2012-10-18 20:05:38 - Emulator] Failed to create Context 0x3005
[2012-10-18 20:05:38 - Emulator] could not get wglGetExtensionsStringARB
[2012-10-18 20:05:38 - Emulator] emulator: WARNING: Could not initialize OpenglES emulation, using software renderer.
[2012-10-18 20:05:38 - Emulator] emulator: WARNING: Requested RAM size of 1024MB is too large for your environment, and is reduced to 768MB.
[2012-10-18 20:05:38 - Emulator] Failed to allocate memory: 1455
[2012-10-18 20:05:38 - Emulator]
[2012-10-18 20:05:38 - Emulator] This application has requested the Runtime to terminate it in an unusual way.
[2012-10-18 20:05:38 - Emulator] Please contact the application's support team for more information.
when i run this application using api 14 it works but it is not working on api 15 and 16
I changed the VM Heap of the Virtual Device to a higher value - this resolved the crash for me.
The values are now: 10.1" WXGA 1280 x 800, Android 4.1.2, Intel Atom, Ram 1024, VM Heap 128, internal Storage 300 MB, SD 300 MB
Further, I changed the start-up settings for the memory in eclipse.ini, but I am not sure whether this is related to the problem or not.
OK I know this is too late for you but it may help someone else. I tried all the solutions given around but none worked for me
Google led me here
http://code.google.com/p/android/issues/detail?id=33336
The solution given worked for many but not for me. I include it here since maybe for you it will help
openGL in the wrong folder:
\tools instead of \tools\lib
copy the following files to the tools folder:
libEGL_translator.dll
libGLES_CM_translator.dll
libGLES_V2_translator.dll
libOpenglRender.dll
However using "Zachary's technique" at the end of the post
For those who cannot get this working.
Go get Process Monitor (http://technet.microsoft.com/en-us/sysinternals/bb896645). Add a filter for 'Process Name' + 'Contains' + 'emulator':
* Start your capture
* fire up the emulator
* wait until you get the failed message
* stop the capture
Search (ctrl + f) the capture for one of the dlls that is failing to load, like "libOpenglRender". You will probably see several attempts at locating this file across multiple directories with the result "NAME NOT FOUND" or "PATH NOT FOUND".
Using this I found I had an issue with atiglpxx.dll
I looked at me display adapter on my windows device manager and downloaded a driver for in my case ATI Modility Radeon HD 2400 XT from AMD
http://support.amd.com/us/psearch/Pages/psearch.aspx?type=2.4.2&product=2.4.2.3.15&contentType=GPU+Download+Detail&ostype=Windows+8+-+32-Bit+Edition&keywords=&items=20
Once I installed that I no longer got the "could not get wglGetExtensionsStringARB" message
Disable GPU emulation by setting it to off in the AVD preferences or by adding -gpu off to command line
Perhaps, your app requires OpenGL 2.0, emulator didn't support it until recently.
Android OpenGL ES 2.0 emulator
check this link
Go to your AVD manager, select the AVD you are trying to use and change the Target dropdown to "Google APIs (Google Inc.) - API Level 16". then save it and restart.
You have to play around with your android device specifications like RAN, Heap and other specification.
It's hard to tell you which must be set to what. In my case I set RAM as 512 and Heap 128 to make it work.

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!! :)

Categories

Resources