Resource record already defined

I am trying to add a splash.png image, but when I compile it, it says this:

Error:error: Resource entry splash is already defined.
res\drawable-hdpi-v4\splash.jpg:0: Originally defined here.
Error:error: Resource entry splash is already defined.
res\drawable-xhdpi-v4\splash.jpg:0: Originally defined here.
Error:error: Resource entry splash is already defined.
res\drawable-xxhdpi-v4\splash.jpg:0: Originally defined here.
Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
C:\Users\German\AppData\Local\Android\android-sdk\build-tools\19.1.0\aapt.exe package -f --no-    crunch -I C:\Users\German\AppData\Local\Android\android-sdk\platforms\android-12\android.jar -M     C:\Users\German\AndroidStudioProjects\BASEUNODISCO\app\build\intermediates\manifests\full\debug\AndroidManifest.xml -S     C:\Users\German\AndroidStudioProjects\BASEUNODISCO\app\build\intermediates\res\debug -A C:\Users\German\AndroidStudioProjects\BASEUNODISCO\app\build\intermediates\assets\debug -m -J C:\Users\German\AndroidStudioProjects\BASEUNODISCO\app\build\generated\source\r\debug -F C:\Users\German\AndroidStudioProjects\BASEUNODISCO\app\build\intermediates\res\resources-debug.ap_ --debug-mode --custom-package disepro.baseunodisco -0 apk --output-text-symbols C:\Users\German\AndroidStudioProjects\BASEUNODISCO\app\build\intermediates\symbols\debug
Error Code:
1
Output:
res\drawable-hdpi-v4\splash.png:0: error: Resource entry splash is already defined.
res\drawable-hdpi-v4\splash.jpg:0: Originally defined here.
res\drawable-xhdpi-v4\splash.png:0: error: Resource entry splash is already defined.
res\drawable-xhdpi-v4\splash.jpg:0: Originally defined here.
res\drawable-xxhdpi-v4\splash.png:0: error: Resource entry splash is already defined.
res\drawable-xxhdpi-v4\splash.jpg:0: Originally defined here.

      

The thing is, I don't have any splash.jpg in my files !! I once put one splash.jpg but I am deleting it already

Please, help! It makes me nervous.

+3


source to share


4 answers


Have you tried cleaning your project?



menu → project → clean

+7


source


The problem is that you cannot have the same filename inside a folder drawable

:

res\drawable-hdpi-v4\splash.png:0: error: Resource entry splash is already defined.
res\drawable-hdpi-v4\splash.jpg:0: Originally defined here.

      



should only have a file .png

or.jpg

remove duplicate files and clean project: Project

Clean

+6


source


In Android Studio, you can get rid of this error message by doing

Build-> Clean Project

+1


source


I had this problem too. But with me, deleting the bin folder and then cleaning and building the project solved the problem. In fact, the duplicate files were in the bin / res folder.

0


source







All Articles