简体   繁体   English

Android Studio 虚拟设备卡在 G 屏幕上

[英]Android Studio Virtual Device stuck on G screen

Been stuck on this for so long, started a new project basic activity app on Android Studio, made a virtual device, but whenever i start it it used to just go to a black screen.坚持了这么久,在Android Studio上启动了一个新的项目基本活动应用程序,制作了一个虚拟设备,但是每当我启动它时,它都会进入黑屏。 Then i wiped memory and now its stuck on a screen with the google G logo with a little loading bar below it.然后我擦除了内存,现在它卡在一个带有谷歌 G 标志的屏幕上,下面有一个小加载栏。 Dosent seem to be moving. Dosent 似乎在移动。 Tried increasing heap memory of the device like some solutions suggested, but that option was greyed out for me.尝试像某些解决方案建议的那样增加设备的堆内存,但该选项对我来说是灰色的。 Any help would be great, thanks!任何帮助都会很棒,谢谢!

This used to happen in my previous laptop.这曾经发生在我以前的笔记本电脑中。 There can be two possibilities for this:-这可能有两种可能性:-

  1. System has less RAM ie less than 8 GB, in this case, try lowering the specs of the emulator by lowering the Resolution.系统内存较少,即小于 8 GB,在这种情况下,尝试通过降低分辨率来降低模拟器的规格。 (This was my case and it solved my problem) (这是我的情况,它解决了我的问题)
  2. The Emulator is heavy on the system which means it will run very slow, give it some time (like half an hour or so) since you have wiped out the memory, it's a fresh start, the first start will take time but subsequent boot up should be fast.模拟器对系统来说很重,这意味着它会运行得很慢,给它一些时间(比如半小时左右),因为你已经清除了内存,这是一个全新的开始,第一次启动需要一些时间,但随后会启动应该很快。 (Example:- I recently emulated the specs of Google Pixel it took nearly 25 minutes just for initial boot and yes, it faced the similar problem as you described, but after that, it is running fine) (例如:- 我最近模拟了 Google Pixel 的规格,仅在初始启动时就花费了近 25 分钟,是的,它遇到了与您描述的类似问题,但在那之后,它运行良好)

What I suggest is我的建议是

  • Try changing the specs of the emulator.尝试更改模拟器的规格。
  • If it doesn't boot, I suggest using a physical Android device (by enabling USB debugging)如果它不启动,我建议使用物理 Android 设备(通过启用 USB 调试)

It would help if you kindly share the exact specs of your system mainly Processor and RAM.如果您愿意分享您的系统(主要是处理器和 RAM)的确切规格,将会有所帮助。

I hope this answer helps.我希望这个答案有帮助。

Edit Try changing the emulator configurations to different settings like lowering the resolution, it might be possible you are using an HD device with 1080p resolution try changing it to 720p and then reboot the device.编辑尝试将模拟器配置更改为不同的设置,例如降低分辨率,您可能使用的是具有 1080p 分辨率的高清设备,请尝试将其更改为 720p,然后重新启动设备。

I can't comment on your question since I have a low reputation so I have to respond through an answer.我无法对您的问题发表评论,因为我的声誉很低,所以我必须通过答案做出回应。 What API level are you using for the virtual device?您为虚拟设备使用什么 API 级别? Could you try to change it to another through the Android Virtual Device Manager?您可以尝试通过 Android 虚拟设备管理器将其更改为另一个吗? Are you able to create any other types of virtual devices?您是否能够创建任何其他类型的虚拟设备? Lastly, you should check if any updates are available.最后,您应该检查是否有可用的更新。 Press Ctrl+Shift+A (or Command+Shift+A for Mac) and search "Android SDK".按 Ctrl+Shift+A(或 Mac 的 Command+Shift+A)并搜索“Android SDK”。 Then look under the Status tab for both the SDK Platforms and SDK Tools tabs for updates.然后在状态选项卡下查看 SDK 平台和 SDK 工具选项卡以获取更新。

我认为您的机器的处理器和内存配置较低,这就是为什么它无法同时处理 Android Studio 和 Emulator。

Wipe data of your emulator.擦除模拟器的数据。 Open AVD Manager AVD(Tools->AVD Manager) click on the small arrow for desired emulator then click on "Wipe data".打开 AVD 管理器 AVD(工具->AVD 管理器)单击所需模拟器的小箭头,然后单击“擦除数据”。

Source: https://stackoverflow.com/a/45358524/8076629来源: https : //stackoverflow.com/a/45358524/8076629

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

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