Hello Android 在我的手机上可以运行,但不能在模拟器上运行
我正在尝试学习Android开发。我已经安装了 Eclipse (3.6.2)、ADT 插件 (10.0.1) 和 Android SDK(官方网站上的 r11),全部安装为 32 位,但我的操作系统是 Windows 7 64 位。
发生的情况是我运行我的应用程序(HelloAndroid)和模拟器,我看到主壁纸屏幕,但然后什么也没有发生!我已经在模拟器上查看了该应用程序,但在任何地方都找不到它。
我的控制台输出如下所示...
[2011-05-20 19:14:20 - HelloAndroid] ------------------------------
[2011-05-20 19:14:20 - HelloAndroid] Android Launch!
[2011-05-20 19:14:20 - HelloAndroid] adb is running normally.
[2011-05-20 19:14:20 - HelloAndroid] Performing com.example.helloandroid.HelloAndroid activity launch
[2011-05-20 19:14:20 - HelloAndroid] Automatic Target Mode: launching new emulator with compatible AVD 'Android2.1'
[2011-05-20 19:14:20 - HelloAndroid] Launching a new emulator with Virtual Device 'Android2.1'
我的 AVD(Android 虚拟设备)已按照教程建议进行设置,目标是 Android2.1-update1-API Level 7。
我已在手机上安装了此应用程序(HTC Hero、Android 2.1)并且它工作正常,但是在我尝试编写其他应用程序之前,我需要让模拟器工作,以前有人遇到过这个问题吗?
我在网上查看过,找不到解决我的问题的解决方案。
提前感谢您的帮助。
I am trying to learn about Android development. I have installed Eclipse (3.6.2) the ADT plugin (10.0.1) and the Android SDK (r11 off the official site) all are installed as 32 bit but my OS is Windows 7 64-bit.
What happens is I run my app (HelloAndroid) and the emulator and I see the main wallpaper screen but then then nothing happens! I have looked on the emulator for the app and cannot find it anywhere.
My console output is shown below...
[2011-05-20 19:14:20 - HelloAndroid] ------------------------------
[2011-05-20 19:14:20 - HelloAndroid] Android Launch!
[2011-05-20 19:14:20 - HelloAndroid] adb is running normally.
[2011-05-20 19:14:20 - HelloAndroid] Performing com.example.helloandroid.HelloAndroid activity launch
[2011-05-20 19:14:20 - HelloAndroid] Automatic Target Mode: launching new emulator with compatible AVD 'Android2.1'
[2011-05-20 19:14:20 - HelloAndroid] Launching a new emulator with Virtual Device 'Android2.1'
My AVD (Android Virtual Device) is set up as the tutorial suggests and the target is Android2.1-update1-API Level 7.
I have installed this app on my phone (HTC Hero, Android 2.1) and it works fine, but before I try and write other applications I need to get the emulator working, has anyone encountered this issue before?
I have looked online and cannot find a solution that solves my problem.
Thanks for your help in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用
adb
来安装您的应用。在 Eclipse 工作区中找到 bin 目录。那里应该有一个YOUR_PROJECT_NAME.apk
文件。要安装它,请从命令行运行:您的路径中将需要 adb。
You can use
adb
to install your app. Find the bin directory in your eclipse workspace. There should be aYOUR_PROJECT_NAME.apk
file there. To install it, from the command line, run:You will need adb in your path.
启动模拟器,切换到Eclipse中的logcat视图(Window -> show view -> other ... -> logcat)。
清除 logcat 的控制台输出。
尝试部署您的应用程序。
logcat 中的输出说明了什么?它是否显示错误消息?
Start the emulator, switch to the logcat view in Eclipse (Window -> show view -> other ... -> logcat).
Clear the console output for logcat.
Try to deploy your application.
What does the output in logcat say? Does it display an error message?