簡體   English   中英

無法在Android Studio中運行Hello World程序

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

我剛剛安裝了最新的Android Studio,以開始進行Android應用程序開發。 我的32位筆記本電腦中有2 GB的RAM。 一旦我嘗試運行基本的hello world程序,它就會給我以下錯誤消息。 我不明白 我是否已安裝所有必需的軟件包,或者缺少某些內容? 請告訴我,我不必更新任何硬件。

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

好吧,我認為您在這里有3個選擇

1號

使用Genymotion

2號

開始在真實的android設備上進行測試

3號(我更喜歡這個)

編輯您正在使用的AVD並將內存設置為512 MB

減少到800 mb會有幫助嗎? 如果是這樣的話? 我怎么做?

第一步

Window -> Android Virtual Device Manager

第二步

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

第三步

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

重新運行模擬器,它應該可以工作。

祝好運

點擊AVD manager ,它將打開已經創建的AVD。 單擊右側的edit AVD icon (倒數第二個)。 之后,單擊“ show advance setting 從這里您可以將RAM的大小減小到512 MB。 祝好運

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM