windows 运行 hello world - 没有在屏幕上显示 hello world
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5106421/
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
running hello world - not getting hello world on screen
提问by Conor
Yeah so im making a bog standard Hello world to make sure android is working. Its my first time working with android so im setting up the enviornment. Ive made the program per: http://developer.android.com/resources/tutorials/hello-world.html
是的,所以我正在制作一个沼泽标准的 Hello world 以确保 android 正常工作。这是我第一次使用 android,所以我设置了环境。我已经根据以下内容制作了程序:http: //developer.android.com/resources/tutorials/hello-world.html
But when i run the program the emulator comes up with the time and date and that its charging. Nothing like the pic in the tutorial. Also the emulator is different though id assume thats cos i made the AVD Android 3.0. Anyone tell me what i need to do to just get Hello World to come up?
但是当我运行程序时,模拟器会显示时间和日期以及它的充电情况。没有什么像教程中的图片。模拟器也不同,虽然我假设那是因为我制作了 AVD Android 3.0。有人告诉我我需要做什么才能让 Hello World 出现吗?
回答by John T
It's probably just sitting at the lock screen. Just swipe across or down to unlock, and your app should show up.
它可能只是坐在锁定屏幕上。只需滑动或向下滑动即可解锁,您的应用就会显示出来。
回答by Dais Maki
I had this also, which led me to this thread.
我也有这个,这让我想到了这个线程。
I left the SDK version field to be blank.
我将 SDK 版本字段留空。
[2011-06-01 21:46:23 - helloWorld] Uploading helloWorld.apk onto device 'emulator-5554'
[2011-06-01 21:46:23 - helloWorld] Installing helloWorld.apk...
[2011-06-01 21:46:45 - helloWorld] Success!
[2011-06-01 21:46:45 - helloWorld] Starting activity com.myhelloworld.MainAct on device emulator-5554
[2011-06-01 21:46:49 - helloWorld] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.myhelloworld/.MainAct }
[2011-06-01 21:47:47 - Emulator] emulator: emulator window was out of view and was recentred
[2011-06-01 21:47:47 - Emulator]
After this message, I wait for the emulator to boot up and i unlocked it and saw its home screen. After a couple of seconds later, my app showed up.
收到这条消息后,我等待模拟器启动并解锁它并看到它的主屏幕。几秒钟后,我的应用程序出现了。
回答by Kosmos
Set options:
设置选项:
-noaudio -no-snapshot-load
in
在
Run->Run Configurations...->Target->Additional Emulator Command Line Options
For me it work.
对我来说它有效。
回答by sll
Just faced the same issue, first time installed Android SDK+Eclipse and tried "Hello, World!", below are steps which helped me figure out what is going on (apologize if this could be worked around in much simple way).
刚刚遇到同样的问题,第一次安装 Android SDK+Eclipse 并尝试“Hello, World!”,下面是帮助我弄清楚发生了什么的步骤(如果可以以更简单的方式解决这个问题,请道歉)。
By default when emulator is starting it show "A N D R O I D..." text with blinking cursor
默认情况下,当模拟器启动时,它会显示带有闪烁光标的“ANDROI D...”文本
- Just wait a bit while it load completely
- Press Unlock button at the Desctop Screen
- When loaded drag to the right
"Unlock"
button (IMG1)
- 稍等片刻,它完全加载
- 在描述屏幕上按解锁按钮
- 加载后拖动到右侧
"Unlock"
按钮(IMG1)
Also you can find and launch manually your application in the Applications list:
您也可以在应用程序列表中手动查找和启动您的应用程序:
- At the bottom of Android Desctop press
"Applications"
button (IMG2) - From a list of available applications select your application and double click to run
- 在 Android Desctop 底部按下
"Applications"
按钮 ( IMG2 ) - 从可用应用程序列表中选择您的应用程序并双击运行
IMG1: Unlock button
IMG1:解锁按钮
IMG2: Applications button
IMG2:应用程序按钮
回答by ScubaSteve
I was having this same issue and the answer is here: running hello world - not getting hello world on screen
我遇到了同样的问题,答案在这里:running hello world - not getting hello world on screen
You do have to wait a good while the first time you load up the AVD. You do have to swipe or w/e to unlock it. Hit the OK button if you see it. Once you get to the "home page", click on the middle button on the bottom menu. This will bring up the apps on the emulator. Find your Hello, Android app, click on it, and you should see your Hello World.
第一次加载 AVD 时,您必须等待一段时间。你必须刷卡或 w/e 才能解锁它。如果您看到它,请点击“确定”按钮。进入“主页”后,单击底部菜单上的中间按钮。这将在模拟器上调出应用程序。找到您的 Hello, Android 应用程序,单击它,您应该会看到您的 Hello World。