Java 无法设置访客内存“android_arm”:参数无效
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/26620765/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Cannot set up guest memory 'android_arm': Invalid argument
提问by Azheng
I've spent days trying to launch any Android program. Even "Hello World" gives me the same error:
我花了几天时间尝试启动任何 Android 程序。甚至“Hello World”也给了我同样的错误:
[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!
任何人都可以帮忙吗?非常感谢!
回答by Mark Zucchini
Try to reduce RAM size of an emulator
尝试减少模拟器的 RAM 大小
In Eclipse
在日食中
Window-> Android Virtual Device Manager
窗口-> Android 虚拟设备管理器
Select your device and click Editbutton in right part of window
选择您的设备,然后单击窗口右侧的“编辑”按钮
Then in Memory Optionssecton find RAMparameter and set it to 512for example. Click OKfor saving. Now try to re-debug your app
然后在Memory Options部分找到RAM参数并将其设置为512例如。单击确定保存。现在尝试重新调试您的应用
回答by Sonam
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
在 Android Studio 中:如果您刚刚更新了工作室,那么您可能会遇到此问题。尝试重新启动 Android Studio。它应该可以解决您的问题
回答by Dexter
If you are facing problem in android studio, just click on show on disk operation
如果您在 android studio 中遇到问题,只需单击磁盘操作上的显示
open config file and find for ram word. Edit size to your desired on and restart the studio. It worked for me.
打开配置文件并查找 ram word。将尺寸编辑为您想要的并重新启动工作室。它对我有用。
回答by Alessio Ricci
In Android Studio:
在 Android Studio 中:
- Open Avd manager
- Edit the settings for the AVD configuration
- Click in the "Show Advanced Settings"
- In the "Memory and Storage" section reduce the RAM size
- 打开 Avd 管理器
- 编辑 AVD 配置的设置
- 点击“显示高级设置”
- 在“内存和存储”部分减少 RAM 大小
回答by dreamdeveloper
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....
对我来说,模拟器的默认 RAM 大小是 1 GB RAM,这是我打开模拟器时遇到的问题。我将 RAM 大小减少到 512 MB,它可以工作....
回答by Anish
In Android Studio:
在 Android Studio 中:
Open AVD Manager and go to Advanced Settings
Tools > Android > AVD Manager > Your Device > Pencil Icon> Show Advanced Settings > Memory and Storage
Reduce RAM size (512 MB worked for me)
打开 AVD 管理器并转到高级设置
工具 > Android > AVD 管理器 > 您的设备 > 铅笔图标 > 显示高级设置 > 内存和存储
减少 RAM 大小(512 MB 对我有用)