简体   繁体   English

将一个android项目从github导入Eclipse后的问题

[英]Problems after Importing an android project from github into Eclipse

I'm trying to tinker with this project and am having some issues importing it. 我正在尝试修补这个项目,并且在导入它时遇到了一些问题。

https://github.com/HoloAddict/FeedEx https://github.com/HoloAddict/FeedEx

I'm a beginner still, and have made a couple of test projects from scratch, but I think I'd learn a little faster by going through working code in a larger project. 我还是初学者,从头开始做了几个测试项目,但我想通过在一个更大的项目中完成工作代码我会学得更快一些。 Just can't get rid of errors to even build the existing code. 即使构建现有代码也无法摆脱错误。 These are the steps I have taken: 这些是我采取的步骤:

  • imported it in as a Git project (file - Import - Git - Projects from Git) 将其作为Git项目导入(文件 - 导入 - Git - Git中的项目)
  • gen folder error (does not exist or not source) - right clicked on gen, Buld path - Use as a source folder. gen文件夹错误(不存在或不存在源) - 右键单击​​gen,Buld path - 用作源文件夹。 This made that particular error go away 这使得特定错误消失了
  • all the src files were listed as src.net.fred... packages, so all the imports were errors. 所有src文件都列为src.net.fred ...包,因此所有导入都是错误的。 Right click - build path - configure build path - added Feedex/src in build path, got rid of those errors. 右键单击 - 构建路径 - 配置构建路径 - 在构建路径中添加Feedex / src,摆脱这些错误。
  • have the R.java problem... tried many clean-build approaches, no luck. 有R.java问题...尝试了许多干净的构建方法,没有运气。 Also tried taking one from a clean project, creating package net.fred.feedex in gen, creating file R.java, and putting code in from a clean project, but no luck. 还尝试从一个干净的项目中获取一个,在gen中创建包net.fred.feedex,创建文件R.java,并从一个干净的项目中放入代码,但没有运气。 It did make the import R go away, but of course left many errors where the res class references are broken, again because that R file is missing (I think). 它确实使导入R消失了,但当然会在res类引用被破坏时留下很多错误,因为R文件丢失了(我认为)。

So that's where I am. 所以我就是这样。 It seems like I have an R.java problem, but I may have messed up on one of the other steps. 好像我有一个R.java问题,但我可能搞砸了其他一个步骤。 Either way, thanks for the help. 无论哪种方式,谢谢你的帮助。

When you imported the project did you check the "Copy projects into workspace"? 导入项目时,您是否选中了“将项目复制到工作区”?

If not import your project again and see if this problem still continues. 如果不再次导入您的项目并查看此问题是否仍然存在。

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

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