Android CLI build shows invalid resource directory name error: MY_PROJECT\res/crunch

android, build, cordova

Solution

Close Eclipse and then run `ant clean` in your project folder.

Problem

I'm building my PhoneGap Android app using the Node.js command line interface, with the command `phonegap run android`. It shows this error: ``` -code-gen: [mergemanifest] Found Deleted Target File [mergemanifest] Merging AndroidManifest files into one. [mergemanifest] Manifest merger disabled. Using project manifest only. [echo] Handling aidl files... [aidl] No AIDL files to compile. [echo] ---------- [echo] Handling RenderScript files... [echo] ---------- [echo] Handling Resources... [aapt] Generating resource IDs... [aapt] invalid resource directory name: C:\Users\brian.lee\Desktop\Eclipse Workspace\facebook_trial\plugins\com.phonegap.plugins.facebookconnect\src\android\facebook\FacebookLib\res/crunch BUILD FAILED ``` I first assumed that it was just looking for a missing folder, so I created a `crunch` folder under `MY_PROJECT/res`, to no avail. I also tried using Eclipse to perform a Project->Clean, to no avail. How do I fix this error? Why is it happening? Also, why is it showing opposing slashes in `.\res/crunch`? Does that matter? EDIT: Eclipse Luna has been showing this error now, as well: [2014-05-21 11:15:37 - Facebook_Trial] invalid resource directory name: C:\Users\brian.lee\Desktop\Eclipse Workspace\facebook_trial\plugins\com.phonegap.plugins.facebookconnect\src\android\facebook\FacebookLib\res/crunch

Original source