简体   繁体   English

创建/删除gen文件夹

[英]creating/deleting gen folder

I've downloaded a sample project. 我已经下载了一个示例项目。 When I imported it to Eclipse I see an error in the BuildConfig.java class : 当我将它导入Eclipse时,我在BuildConfig.java类中看到一个错误:

like : 喜欢 :

在此输入图像描述

The error indicates that i must delete dot ("."). 错误表明我必须删除点(“。”)。 but when I delete dot(".") - And then save it, error is corrected on the BuildConfig.java class. 但当我删除点(“。”) - 然后保存它,错误在BuildConfig.java类上得到纠正。

now The error appears in the gen folder. 现在错误出现在gen文件夹中。

在此输入图像描述

why ? 为什么?

I deleted the gen folder, but again the same error is made. 我删除了gen文件夹,但同样出错了。 newest clips 最新的剪辑

It looks like you're missing your own project's package name, or may be you have a misconfigured library. 看起来您错过了自己项目的软件包名称,或者您可能有错误配置的库。

Make up a unique package name (for instance, something like com.emamian.app, do not use com.example.app) 组成一个唯一的包名称(例如,com.emamian.app之类的东西,不要使用com.example.app)

Also, right-click your project, click on 'Build config path...' (or something like that, click on Android in the left pane, then on the right side pane, scroll down and resolve any library problem by removing the libraries with red marks in front and re-adding them yourself manually by pressing the add button) 此外,右键单击您的项目,单击“构建配置路径...”(或类似的内容,在左窗格中单击Android,然后在右侧窗格中,向下滚动并通过删除库来解决任何库问题在前面有红色标记并通过按下添加按钮手动重新添加它们

Then clean your project, look at the problems view, double-click on each problem (it will take you to the exact file and line where there is a problem), correct the missing package name at each location it tells you to. 然后清理项目,查看问题视图,双击每个问题(它会将您带到存在问题的确切文件和行),在它告诉您的每个位置更正缺少的包名称。

Then Clean the project again and repeat the process until it works. 然后再次清理项目并重复该过程直到它工作。

You cannot modify it manually. 您无法手动修改它。 Clean the project or before importing, delete all other folders except src, res and the manifest. 清理项目或导入之前,删除除src,res和清单之外的所有其他文件夹。 Always worked for me. 一直为我工作。

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

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