Cannot set up guest memory 'android_arm': Invalid argument

情到浓时终转凉″ 提交于 2019-12-03 16:29:15

问题


I've spent days trying to launch any Android program. Even "Hello World" gives me the same error:

[2014-10-28 18:07:14 - android19] Android Launch!  
[2014-10-28 18:07:14 - android19] adb is running normally.  
[2014-10-28 18:07:14 - android19] Performing com.example.android19.MainActivity activity launch  
[2014-10-28 18:07:14 - android19] Automatic Target Mode: launching new emulator with compatible AVD 'first'  
[2014-10-28 18:07:14 - android19] Launching a new emulator with Virtual Device 'first'  
[2014-10-28 18:07:43 - Emulator] Cannot set up guest memory 'android_arm': Invalid argument

Anyone can help? Thanks much!


回答1:


Try to reduce RAM size of an emulator

In Eclipse

Window -> Android Virtual Device Manager

Select your device and click Edit button in right part of window

Then in Memory Options secton find RAM parameter and set it to 512 for example. Click OK for saving. Now try to re-debug your app




回答2:


In Android Studio:

  1. Open Avd manager
  2. Edit the settings for the AVD configuration
  3. Click in the "Show Advanced Settings"
  4. In the "Memory and Storage" section reduce the RAM size



回答3:


For me, the default RAM size of emulator was 1 GB RAM which was the issue for me in opening the emulator. I reduced RAM size to 512 MB and it works....




回答4:


In Android Studio:

  1. Open AVD Manager and go to Advanced Settings

    Tools > Android > AVD Manager > Your Device > Pencil Icon> Show Advanced Settings > Memory and Storage

  2. Reduce RAM size (512 MB worked for me)

RAM size




回答5:


In Android Studio: If you have just updated the studio then you might face this problem. Try restarting Android Studio. It should solve your problem




回答6:


If you are facing problem in android studio, just click on show on disk operation

open config file and find for ram word. Edit size to your desired on and restart the studio. It worked for me.



来源:https://stackoverflow.com/questions/26620765/cannot-set-up-guest-memory-android-arm-invalid-argument

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!