简体   繁体   English

无法在Android Studio中运行Hello World程序

[英]Can't run a hello world program in Android Studio

I just installed the latest Android Studio to get started off with Android app development. 我刚刚安装了最新的Android Studio,以开始进行Android应用程序开发。 I have 2 GB of RAM running in my 32-bit laptop. 我的32位笔记本电脑中有2 GB的RAM。 As soon as I try to run the basic hello world program, it gives me the following error message. 一旦我尝试运行基本的hello world程序,它就会给我以下错误消息。 I don't understand this. 我不明白 Do I have all the necessary packages installed or is there something missing? 我是否已安装所有必需的软件包,或者缺少某些内容? Please tell me I don't have to update any hardware. 请告诉我,我不必更新任何硬件。

emulator: WARNING: Requested RAM size of 1536MB is too large for your environment, and is reduced to 1152MB.
emulator: device fd:592
HAX is not working and emulator runs in emulation mode
emulator: The memory needed by this VM exceeds the driver limit.
Cannot set up guest memory 'pc.ram': Invalid argument
Error accepting connection, aborting

Well i think you have 3 options here 好吧,我认为您在这里有3个选择

Number 1 1号

Use Genymotion 使用Genymotion

Number 2 2号

Start testing on a real android device 开始在真实的android设备上进行测试

Number 3 (i like this more) 3号(我更喜欢这个)

Edit the AVD that you are using and set the memory to 512 MB 编辑您正在使用的AVD并将内存设置为512 MB

will reducing to 800 mb help? 减少到800 mb会有帮助吗? If so? 如果是这样的话? How do I do that? 我怎么做?

First step 第一步

Window -> Android Virtual Device Manager

Second Step 第二步

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

Third Step 第三步

In Memory Options secton find RAM parameter and set it to 512. Click OK for saving option

Rerun the emulator and it should work. 重新运行模拟器,它应该可以工作。

Good luck 祝好运

Click on AVD manager ,it will open already created avd. 点击AVD manager ,它将打开已经创建的AVD。 Click on edit AVD icon which as right side (second last). 单击右侧的edit AVD icon (倒数第二个)。 after that click on show advance setting . 之后,单击“ show advance setting from here you can reduce size of RAM to 512 MB. 从这里您可以将RAM的大小减小到512 MB。 Good Luck 祝好运

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM