Java 使用 Android 开发卡在 Eclipse 中的模拟器屏幕上?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2475756/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-13 08:11:27  来源:igfitidea点击:

Stuck on emulator screen in Eclipse with Android Development?

javaandroideclipse

提问by coderama

I've followed this tutorial: http://anandhansubbiah.com/blog/writing-your-first-android-application/, but no matter what I do, and what I change, when I run the app, all I see is the image below. Is there something I must press to start developing? Did I add starting code. I'm completely stumped...

我遵循了本教程:http: //anandhansubbiah.com/blog/writing-your-first-android-application/,但无论我做什么,我改变什么,当我运行应用程序时,我看到的都是下图。有什么我必须按下才能开始开发的吗?我是否添加了起始代码。我完全被难住了...

Screen I see http://img196.imageshack.us/img196/1700/stuckl.jpg

屏幕我看到 http://img196.imageshack.us/img196/1700/stuckl.jpg

采纳答案by Adrian

From you're screenshot it appears the emulator hasn't fully started so it's unlikely to be a problem with your app. It can take a while to start so leave it for a few minutes just to be sure it's not slow. If that doesn't work try recreating the AVD.

从您的屏幕截图来看,模拟器似乎尚未完全启动,因此您的应用程序不太可能出现问题。启动可能需要一段时间,因此请等待几分钟以确保它不会变慢。如果这不起作用,请尝试重新创建 AVD。

Once the AVD is running you can redeploy your app to it as often as you want so there's no need restart it.

AVD 运行后,您可以根据需要随时重新部署您的应用程序,因此无需重新启动它。

回答by Chris

You don't have to press anything, and your code shouldn't be able to cause that. It looks like something's wrong with your emulator.

您不必按任何东西,您的代码也不应该导致这种情况。你的模拟器好像有问题。

The SDK comes with a few tools you can use to try and figure out what's going on and fix it.

SDK 附带了一些工具,您可以使用它们来尝试找出发生了什么并修复它。

adbis the debug bridge - use adb logcatto see logs from the device. I don't think it will connect with the emulator in that state, but you might as well give it a try anyway.

adb是调试桥 - 用于adb logcat查看来自设备的日志。我不认为它会在那种状态下与模拟器连接,但无论如何你不妨试一试。

androidis the main AVD manager, and you can use it to create new virtual devices and see details if they failed to load.

android是主要的 AVD 管理器,您可以使用它来创建新的虚拟设备并查看加载失败的详细信息。

If neither produce anything useful or obviously wrong with your virtual device, you might want to try just creating a new AVD in the manager and using that instead. You may also want to try starting the emulator yourself instead of letting Eclipse do it, just in case it's doing something to break it. Use the emulatortool in the SDK to do that.

如果您的虚拟设备既没有产生任何有用的东西,也没有明显的错误,您可能只想尝试在管理器中创建一个新的 AVD 并使用它。您可能还想尝试自己启动模拟器,而不是让 Eclipse 来做,以防万一它正在做一些事情来破坏它。使用emulatorSDK 中的工具来执行此操作。

回答by eli

I had the same problems on a ee pc, it took half an hour to begin working, then i tried in a stronger pc and it works, Your pc may be to weak for the emulator, just think that the new phones have a 1400 MHz processor and they are running the program not the emulator which is much easier

我在 ee pc 上遇到了同样的问题,开始工作花了半个小时,然后我尝试了一个更强大的 pc 并且它可以工作,你的 pc 可能对模拟器来说太弱了,只是认为新手机有 1400 MHz处理器,他们正在运行程序而不是模拟器,这要容易得多

回答by pnm

simply lower the ram in the edit menu and it should work fine

只需在编辑菜单中降低 ram,它应该可以正常工作

回答by SalicBlu3

When I start AVD, I enabled "Wipe User Data".

当我启动 AVD 时,我启用了“擦除用户数据”。

回答by patel8786

When the AVD is created a folder /.android is created to store the AVD. I moved the folder. Restarted Eclipse and recreated the AVD and it worked.

创建 AVD 时,会创建一个文件夹 /.android 来存储 AVD。我移动了文件夹。重新启动 Eclipse 并重新创建 AVD 并且它起作用了。

回答by yakup_y

Stop the emulator --> Open ADV Manager --> Edit the Virtual device --> Click Show Advanced Settings --> Set the Ram size 512mb --> Start the emulator

停止模拟器 --> 打开 ADV Manager --> 编辑虚拟设备 --> 单击显示高级设置 --> 将内存大小设置为 512mb --> 启动模拟器