问题
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:
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
回答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:
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)
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