Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse project not built on Mac due to 'A resource exists with a different case' error

Tags:

macos

eclipse

I am trying to following instructions to import android java source to eclipse on mac:

http://source.android.com/source/using-eclipse.html

I did create a new partition ('Mac OS Extended, case sensitive, journaled) on Mac. I was able to build android sdk successfully at command line.

But when I try to create a new eclipse project and I get this error which prevents eclipse from building the android source:

The project was not built due to "A resource exists with a different
case: '/android/out/target/common/obj/JAVA_LIBRARIES/
android_stubs_current_intermediates/classes/MANIFEST.mf'.". 
Fix the problem, then try refreshing this project and building it since it may
be inconsistent android

Can you please tell me how can to fix my problem?

like image 337
yinglcs Avatar asked Feb 04 '09 22:02

yinglcs


2 Answers

I just ran into this issue. It occurs when you have a case mismatch on package names. I resolved it by closing Eclipse and reconciling all package names in my project folder (under bin, gen and src) as well as in my AndroidManifest.xml. Once everything matched, I reopened Eclipse, did a Clean and Build and the error went away.

like image 120
ajh158 Avatar answered Oct 07 '22 14:10

ajh158


I encountered this problem when I had 2 seperate packages with different case defined in same project

src/main -> com.mycompany.project.DAO

src/test > com.mycompany.project.dao

Actually the 2nd package was for JUnit test cases & should not have been on build path. When I removed the 2nd package from build path (rightclick src/test -> remove from build path), this error was gone.

like image 37
Ally Avatar answered Oct 07 '22 13:10

Ally