Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A resource exists with a different case

I'm unable to build my android app due to a strange error:

Description Resource Path Location Type The project was not built due to "A resource exists with a different case: '/ProjectName/bin/classes/com/Name/ProjectName'.". Fix the problem, then try refreshing this project and building it since it may be inconsistent ProjectName Unknown Java Problem

My file structure is the following: http://pastebin.com/6P6mEftD

I checked for files that had almost the same name and I couldn't find any. This was marked as the solution in a previously asked question that described the same error.

like image 515
Mechazawa Avatar asked Oct 28 '12 11:10

Mechazawa


Video Answer


2 Answers

I had the same "resource exists with a different case" error.

The fix I had to make was in the AndroidManifest.xml file. My "package" parameter in the manifest XML tag did not exactly match the package name in my Java files. I suggest you look in the manifest XML and see if you spot the naming issue there.

like image 128
Doug N Avatar answered Oct 06 '22 15:10

Doug N


I just had this error and I studied a lot to solve it.

Here it goes:

All answers you might find, may be correct because there're differents causes for it. To solve this issue, you must look into the "R.java" generated in the "gen" folder.

Once you opened it, look for two class that has the same name but is written with different cases. Example (mine): "String" ... "string"

Then, you will figure out that you miss spelt some thing. You never use Upcase letter to call strings at the xml file.

Example: android:contentDescription="@+String/imageView2"
DO NOT write string with capital S.

use:

android:contentDescription="@+string/imageView2" instead.

Once you locate the string you need to find where you put it with the find command. Once you correct the "grammar", just clean your project.

Pease.

TMA.

like image 41
Totalys Avatar answered Oct 06 '22 15:10

Totalys