简体   繁体   English

Eclipse无法在模拟器中启动android应用

[英]Eclipse doesn't start android app in emulator

I'm right at the beginning of android programming. 我是在android编程的开始。

I created an AVD that works just fine when launching via the AVD-manager. 我创建了一个AVD,它在通过AVD经理启动时效果很好。 I also "created" a hello-world app as a little test. 我还“创建”了一个hello-world应用程序作为一个小测试。

When I try to run the app as an android app, nothing happens. 当我尝试将应用程序作为android应用程序运行时,没有任何反应。 No output in the console, emulator doesn't start (or launchs app when already started), no message, nothing. 控制台中无输出,模拟器无法启动(或在启动时启动应用程序),没有消息,什么也没有。 Can anyone help me? 谁能帮我?

Thanks a lot 非常感谢

Not sure if this will help you but, during our android lab sessions some computers had a slimier problem. 不知道这是否对您有帮助,但是在我们的android实验期间,某些计算机出现了更苗条的问题。 How it was fixed is by doing the following: 修复方法如下:

  1. Next to the "Run as" button, there is a small arrow, click it. 在“运行方式”按钮旁边,有一个小箭头,单击它。
  2. Select "Run configurations". 选择“运行配置”。
  3. On the left, double click "Android Application". 在左侧,双击“ Android应用程序”。
  4. There should be 3 tabs appearing on the right (Android, Target, Common) 右侧应显示3个标签(Android,Target和Common)
    • Under "Android", browse and select the project you want to run. 在“ Android”下,浏览并选择要运行的项目。
    • Launch Action: select "Launch Default Activity". 启动动作:选择“启动默认活动”。
  5. Click on "Target" tab. 点击“目标”标签。
    • There should be an AVD table with the Android virtual devices you created through the manager. 应该有一个AVD表,其中包含您通过管理器创建的Android虚拟设备。 In case there isn't, hit refresh or click on "Manager" to make sure you have created it and then refresh again. 如果没有,请单击刷新或单击“管理器”以确保已创建它,然后再次刷新。
    • if there is an AVD, it should appear with a small check box on the left side of it, click it and then click on "Run". 如果有AVD,则应在其左侧显示一个小复选框,单击它,然后单击“运行”。

This fixed the issue for most students, hopefully it will in your case as well. 这为大多数学生解决了该问题,希望对您而言也是如此。 If not then I hope someone can answer it for you. 如果没有,我希望有人可以为您回答。

I had the same problem. 我有同样的问题。 I think its because u created a project with a blank activity. 我认为是因为您创建了一个空白活动的项目。 so when the app starts it doesn't have anything to do.. 因此,当应用启动时,它没有任何事情要做。

to solve the issue just add an activity, intent and a category to your manifest file and run 要解决该问题,只需在清单文件中添加活动,意图和类别并运行

If you are using Windows, Give your SDK path in Eclipse as Windows->preferences ->Android->SDK Location 如果您使用的是Windows,请在Eclipse中将您的SDK路径指定为Windows-> preferences-> Android-> SDK位置

here you give your sdk path. 在这里,您将给出您的SDK路径。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM