'Android Pre Compiler' error 'Path must include project and resource name'

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

  • archive for required library could not be read or is not a valid ZIP file
  • how to add android project to git
  • Import existing Android project in Eclipse: no gen source folder?
  • Import android project in ADT Eclipse from github
  • Git install with Aptana
  • 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!

  • open eclipse Markeplace
  • Android Studio: Can't start Git
  • Eclipse Git Error: Error occurred computing diffs
  • Which files on .idea directory should be committed to git repository?
  • C++11 settings in Eclipse Indexer conflict with git
  • How to get code from git in windows
  • 2 Solutions collect form web for “'Android Pre Compiler' error 'Path must include project and resource name'”

    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”
    Git Baby is a git and github fan, let's start git clone.