什么是命令"修复项目属性"究竟怎么办?属性、命令、项目、QUOT

2023-09-04 08:19:19 作者:- 乱世震屌丝.骚年威武

什么是项目 - > Android的工具 - >修复项目属性Eclipse的命令exaclty怎么办?

What does the "Project->Android Tools->Fix Project Properties" Eclipse command exaclty do?

我看了很多次使用它,主要是在Eclipse中的Andr​​oidř产生问题的相关答案,但对我来说就像是魔术,我就可以了preSS,我想这Fixs一些项目属性,但没有发生...没有视觉反馈,没有资料上项目属性已得到修复......任何人都可以给一点上是什么它究竟是做洞察力?

I have read many times to use it, mostly in answers related with Android R generation problems in Eclipse, but for me it is like magic, I press on it and I suppose it Fixs some Project Properties, but nothing happens... no visual feedback, no info on which project properties has been fixed... anyone can give a bit of insight on what does it exactly do?

THX

推荐答案

通过观察ADT源$ C ​​$ C,具体到 FixProjectAction 和阅读源和评论,我们可以看到,它调用:

By looking into ADT source code, specifically into FixProjectAction and reading source and comments we can see that it calls:

ProjectHelper.fixProject(project);
ProjectHelper.fixProjectNatureOrder(project);
AndroidNature.configureResourceManagerBuilder(project);
AndroidNature.configurePreBuilder(project);
AndroidNature.configureApkBuilder(project);

ProjectHelper.fixProject(项目)做:

在创建Java项目 修正路径条目,以确保: 在该项目不引用任何旧android.zip/android.jar存档 的项目不使用它的输出文件夹作为一个源码文件夹 在该项目不引用桌面JRE 该项目引用AndroidClasspathContainer。 creates Java project fixes classpath entries to ensure that: the project does not reference any old android.zip/android.jar archive the project does not use its output folder as a sourc folder the project does not reference a desktop JRE the project references the AndroidClasspathContainer.

ProjectHelper.fixProjectNatureOrder(项目)重新安排项目性质,使Android项目自然是第一位。

ProjectHelper.fixProjectNatureOrder(project) reorders project natures, so that Android project nature is first.

AndroidNature.configureResourceManagerBuilder(项目)添加ResourceManagerBuilder,如果它不是已经存在。它会插入自己作为第一个构建。

AndroidNature.configureResourceManagerBuilder(project) adds the ResourceManagerBuilder, if its not already there. It'll insert itself as the first builder.

AndroidNature.configure preBuilder(项目)增加了preCompilerBuilder如果没有的话。它会检查ResourceManager中的presence,右后插入本身。

AndroidNature.configurePreBuilder(project) adds the PreCompilerBuilder if its not already there. It'll check for presence of the ResourceManager and insert itself right after.

AndroidNature.configureApkBuilder(项目)添加.apk文件生成器在结束时,如果它不是已经存在。

AndroidNature.configureApkBuilder(project) adds the .apk builder at the end if it's not already there.

最后三个调用确保您有正确的建设者为您的项目。当你看到你的建设者节中的Eclipse项目的属性,你会看到:

Last three calls ensure that you have correct builder for your project. When you look at your Builders section in eclipse project properties you will see:

在Android的资源管理器中第一个 Android的$ P $资源管理器后,p编译器 在Android的程序包生成器最后