在android studio的AVD manager中创建了模拟器Pixel_2_API_29,之后启动报了The emulator process for AVD Pixel_2_API_29 was killed.如下图
之后再网上找了很多解决方案,例如config.ini文件修改
hw.gpu.enabled = no
hw.gpu.mode = off
或者Pixel_2_API_29.ini中修改path为avd对应的路径,如果环境变量的ANDROID_SDK_HOME在创建虚拟设备之前已经设置,默认的就是正确的路径。
之后再运行还是报了这个错误,如果运行程序报了Emulator: Process finished with exit code 1
Emulator: emulator: ERROR: Not enough space to create userdata partition. Available: 4037.585938 MB at C:\Users\Administrator\AppData\Local\Android\.android\avd\Pixel_2_API_29.avd, need 7372.800000 MB.
等于要7个G左右,而我的C盘的剩余空间已经已经不足,也许这是真正的原因。当然如果配置错误也会报上面的The emulator process for AVD Pixel_2_API_29 was killed.