eclipse Android 初学者:模拟器未运行应用程序或更新它
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9272760/
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
Android Beginner: Emulator not running app or updating it
提问by harshalizee
[2012-02-14 11:57:59 - HarshaBoston] Android Launch!
[2012-02-14 11:57:59 - HarshaBoston] adb is running normally.
[2012-02-14 11:57:59 - HarshaBoston] Performing com.boston.harsha.startPoint activity launch
[2012-02-14 11:57:59 - HarshaBoston] Automatic Target Mode: launching new emulator with compatible AVD 'Droid8'
[2012-02-14 11:57:59 - HarshaBoston] Launching a new emulator with Virtual Device 'Droid8'
[2012-02-14 11:58:05 - Emulator] emulator: WARNING: Unable to create sensors port: Unknown error
Ok so this is what the console is showing. My emulator was working fine until a couple of days ago, then my projects were not updating the changes made to the main.xml file even though the changes were saved.
好的,这就是控制台显示的内容。我的模拟器在几天前工作正常,然后我的项目没有更新对 main.xml 文件所做的更改,即使更改已保存。
Now, I wanted to see if a new project would work, but no dice. The emulator runs fine, but my app is not loaded, I have no idea what to do to rectify this.
现在,我想看看一个新项目是否可行,但没有骰子。模拟器运行良好,但我的应用程序没有加载,我不知道如何解决这个问题。
I'm using API Level 8, with ADT plugin Android SDK on eclipse on Windows XP.
我正在使用 API 级别 8,在 Windows XP 上的 eclipse 上使用 ADT 插件 Android SDK。
Android beginner here. I was making a Hello World program, which ran fine a couple of days ago, but now nothing runs, and existing projects don't show the changes made to them. Please help! Now when I run the emulator, the emulator runs fine but my app isn't even loaded!
Android初学者在这里。我正在制作一个 Hello World 程序,几天前它运行良好,但现在没有任何运行,并且现有项目不显示对它们所做的更改。请帮忙!现在,当我运行模拟器时,模拟器运行良好,但我的应用程序甚至没有加载!
I've already tried reinstalling the ADT, reinstalled the Android SDK,etc. nothing happpened
我已经尝试重新安装 ADT,重新安装 Android SDK 等。什么都没发生
Also, the emulator doesn't seem to be showing up on the DDMS.
此外,模拟器似乎没有出现在 DDMS 上。
FIXED IT!! SOLUTION FOR ANYONE FACING THIS PROBLEMApparently a lot of people in here seem to have this problem and only one of the threads had a good solution.
修复!!任何人都面临这个问题的解决方案显然,这里的很多人似乎都有这个问题,只有一个线程有一个很好的解决方案。
Firstly if this is happening to you, check the DDMS to see if the emulator is shown. This is the a red flag. Apparently the adb server does not refresh or restart every time you restart eclipse.
Run the emulator. Chances are your app may not run on the emulator. Now, while the emulator is still running go the DDMS tab and next to the Screen Capture icon there is a dropdown menu with 'Reset ADB', click on it. Now your emulated device should be shown in the DDMS devices.
Run your app now. hopefully this solved your problem. Mine did!
首先,如果您遇到这种情况,请检查 DDMS 以查看是否显示了模拟器。这是红旗。显然,每次重新启动 eclipse 时,adb 服务器都不会刷新或重新启动。
运行模拟器。您的应用可能无法在模拟器上运行。现在,当模拟器仍在运行时,转到 DDMS 选项卡,在 Screen Capture 图标旁边有一个带有“重置 ADB”的下拉菜单,单击它。现在您的模拟设备应该显示在 DDMS 设备中。
立即运行您的应用程序。希望这解决了你的问题。我的做到了!
采纳答案by harshalizee
FIXED IT!! SOLUTION FOR ANYONE FACING THIS PROBLEM Apparently a lot of people in here seem to have this problem and only one of the threads had a good solution.
修复!!任何人都面临这个问题的解决方案 显然,这里的很多人似乎都有这个问题,只有一个线程有一个很好的解决方案。
Firstly if this is happening to you, check the DDMS to see if the emulator is shown. This is the a red flag. Apparently the adb server does not refresh or restart every time you restart eclipse.
首先,如果您遇到这种情况,请检查 DDMS 以查看是否显示了模拟器。这是红旗。显然,每次重新启动 eclipse 时,adb 服务器都不会刷新或重新启动。
Run the emulator. Chances are your app may not run on the emulator. Now, while the emulator is still running go the DDMS tab and next to the Screen Capture icon there is a dropdown menu with 'Reset ADB', click on it. Now your emulated device should be shown in the DDMS devices.
运行模拟器。您的应用可能无法在模拟器上运行。现在,当模拟器仍在运行时,转到 DDMS 选项卡,在 Screen Capture 图标旁边有一个带有“重置 ADB”的下拉菜单,单击它。现在您的模拟设备应该显示在 DDMS 设备中。
Run your app now. hopefully this solved your problem. Mine did!
立即运行您的应用程序。希望这解决了你的问题。我的做到了!
回答by toes
I had the same problem with developing my android app on an emulator. I would rebuild and install my application and it would keep installing an older version of my app (reinstalling app, and the answer above didn't help). Turns out running ant clean
and rebuilding the project fixed it!
我在模拟器上开发我的 android 应用程序时遇到了同样的问题。我会重建并安装我的应用程序,它会继续安装我的应用程序的旧版本(重新安装应用程序,上面的答案没有帮助)。原来运行ant clean
和重建项目修复了它!