且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Android应用不会在模拟器上启动

更新时间:2023-01-04 20:56:58

尝试添加

<category android:name="android.intent.category.DEFAULT" />

默认情况下,Eclipse将启动DEFAULT活动。如果不起作用,右键单击项目,并检查运行配置。您可以选择设置要启动的活动。

Eclipse by default launches the DEFAULT activity. If that does not work, right click on the project, and check the run configurations. You have an option to set which activity to launch.

此外,您应该可以在模拟器启动器的应用程序抽屉中看到您的应用程序的图标。点击该图标,看看应用程序是否启动。如果没有,那么问题出在你的活动中(尽管我没有看到任何错误)。

Also, you should be able to see the icon for your app in the applications drawer on the emulator launcher. Click on that icon and see if the app launches. If it does not, then the problem is in your activity somehow (although I did not see anything wrong in it).

如果这两个不起作用,请尝试重新启动adb从命令提示符:

If those two do not work, try restarting adb from the command prompt:

>adb kill-server
>adb start-server