Android运行时错误

时间:2012-12-24 22:31:22

标签: android

我是初学Android开发者:)我将android sdk完全从2.0版本下载到4.2。我创建了一个新项目并添加了一些按钮,然后我尝试运行我的第一个项目,并得到了这样的错误:

[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.

如何解决此错误?

2 个答案:

答案 0 :(得分:0)

对于特定的仿真器密度设置有时会发生这种情况。尝试使用其他模拟器,调整其设置,直到它开始工作。

答案 1 :(得分:0)

我得到同样的错误......

解决方案

config.ini 文件

下将 hw.ramSize 更改为1024MB
$User>.android>avd>name_of_avd> config.ini

工作正常