Using Eclipse with a Android project using the new gradle build system / project structure / layout

‹ Giraffes Fighting | The Architecture of Open Source Applications ePub download ›

The Eclipse Android ADT plugin hard-codes paths for the AndroidManifest.xml file, the res directory and the gen directory.  If you migrate an Android project to the new Gradle project structure, it will stop working in Eclipse.  You can work around this by creating symbolic links from the new Gradle layout to the old locations expected by ADT.  For example, from the root of your project, if you have a android directory, you can run these commands:

rm -rf res gen AndroidManifest.xml
ln -s android/build/res/all/debug res
ln -s android/src/main/AndroidManifest.xml .

Subscribe to All Posts - Wesley Tanaka