简体   繁体   English

Eclipse中的Android应用程序项目缺少文件

[英]Missing files with Android Application Project in Eclipse

When i create a new "Android Application Project" in Eclipse with the options "Create custom launcher icon", "Create activity" and "Create Activity" marked, it creates the project without the package "com.example.yourAppName" and without the folder "res/menu". 当我在Eclipse中使用标记为“创建自定义启动器图标”,“创建活动”和“创建活动”的选项创建一个新的“ Android应用程序项目”时,它将创建不包含“ com.example.yourAppName”包且不包含文件夹“ res / menu”。

I want to know the reason and how i can solve this. 我想知道原因以及如何解决这个问题。

A few days ago, when i created a project with that options, it created all the default folders, but not now... 几天前,当我使用该选项创建一个项目时,它创建了所有默认文件夹,但现在不创建...

Thank you. 谢谢。

When you create a new Android Application Project, you see Application Name, Project Name, Package name. 创建新的Android应用程序项目时,您会看到应用程序名称,项目名称,程序包名称。 What do you see in Package name? 您在包裹名称中看到了什么?

PS: I don't enough reputation to add it as a comment PS:我的声誉不足,无法将其添加为评论

This is to do with the new Android SDK tools 22.6 update; 这与新的Android SDK工具22.6更新有关; it appears to have broken it. 它似乎已损坏。 I just updated mine today and this happened. 我今天刚刚更新了我的,这发生了。 For some reason, they added a new 'create activity' checkbox on a second screen that was not on the previous version; 由于某种原因,他们在第二个屏幕上添加了一个新的“创建活动”复选框,该复选框不在以前的版本中。 this could be the cause of the error. 这可能是错误的原因。

If you still have the original ZIP file like I did, the easiest solution is to remove eclipse and just extract the previous version. 如果您仍然像我一样拥有原始的ZIP文件,最简单的解决方案是删除eclipse并提取以前的版本。 It'll then work again. 然后它将再次工作。

您可以使用clean选项菜单解决此问题:从菜单栏中选择: project -> clean..然后

always use some package pattern like com.orgname.yourpack motive. 始终使用com.orgname.yourpack动机之类的打包模式。 For your case please check the sdk version you use. 对于您的情况,请检查您使用的SDK版本。 Its happen most of the time bue to the newest version and you can rename any time your package by rightclick on project and then refactor. 它大多数时候都发生在最新版本上,您可以在任何时候通过右键单击项目然后重构来重命名软件包。

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

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