Getting a problem in eclipse which says
The project was not built due to "A resource exists with a different case:
'/AgriExpenseTT/bin/classes/uwi/dcit/agriexpensett'.". Fix the problem, then try refreshing this project and building it since it may be inconsistent
I've read other posts saying to check my package name/ delete my R.java/ delete bin folder/clean the project/restart eclipse and or computer, i've tried them all but to no avail, however i've noticed that in my bin/classes/uwi/dcit/agriexpensett there were no class files, is that supposed to happen if i've an error, any help is appreciated thanks
The best way I found to avoid this problem is to make an intermediate change to another package name, so if you are trying to rename a package from com.example.MyApplication
to com.example.myapplication
you need to do the following:
Rename the package com.example.MyApplication
to com.example.myapplication2
(this should be successful and you will not face the error: [A resource exists with a different case ..]
Rename the package com.example.myapplication2
to com.example.myapplication
This way I could avoid this error in Eclips, I think it is related to the fact that package names has to be reflected to the folder names in the file system, so you can not have two folders with the same name but different with the case only.
Faced this problem just now and found the cause. My source code was under the package com.ABCD.util and test code in com.ABCD.util.test. Then I changed the source code package name from com.ABCD.util to com.abcd.util. After that I started getting this error. Test classes which were going to the same bin folder, differed in case (ABCD and abcd). Once I changed the case of test-classes too, the problem went away. All his, even though the package ABCD was empty.
This problem is caused by a typo in your package name some where in the project, "a different case".
I suggest you compare package name in all these places:
1.Manifest.xml >> package name should be all in small letters
2.packages in src folder
3.packages in gen folder
they should all be the same, if not fix it or refactor the wrong package name, this will solve it.
my problem was in different case in gen folder package, i hope this helps.
*keep on cleaning, building the projects, closing/reopen them and restarting eclipse sometimes
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With