I'm trying to compile the Android project SGTPuzzles, and am running into problems that I need help understanding. The error is:

Errors occurred during the build. Errors running builder 'Android Pre Compiler' on project 'SGTPuzzles'. Path must include project and resource name: /SGTPuzzles

I'm new to Android development (and Eclipse and Java), and so I'm not really sure how to figure out the source of the error. I'm running Ubuntu 12.04, ADT v22.3, and have imported the SGTPuzzles project into my Eclipse workspace with the included Git tools.

I searched the web and found similar problems here and here (among some less useful non-stackoverflow results), but no solutions. I've tried clearing my workspace, re-cloning the repository, and restarting Eclipse. I've tried the 'Android Tools'->'Fix Project Properties'. Nothing has helped. I don't know where to look to learn more about what file or resource is causing this problem, so it's tricky for me to debug. Any suggestions would be really appreciated. Thanks!

有帮助吗?

解决方案 2

This one's my fault: I had the *.c files at the root of the project (hoping to keep the same paths as upstream svn), and thus the root as a source folder, and ADT started objecting to that, by crashing in com.android.ide.eclipse.adt.internal.build.SourceProcessor.buildSourceFileList() trying to resolve /SGTPuzzles to a project and resource (i.e. subfolder), which fails. Fixed in current git by mv *.c jni/.

其他提示

This helped me:

  • Right click on the project and go to "Properties"
  • Select "Java Build Path" on the left
  • Open "Source" tab
  • Remove "YourProject" from source files (make sure "gen" folder and "src" are in the source files)
  • Again right click on the project and in the "Andriod Tools" click on "Fix Project Properties"
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top