2

I m trying to compiling my app for android with react-native 0.25 ( i know that s not the last one but i started the project a long time ago now ) .

I recently changed one of my assets from "downArrow.jpg" to "downArrow.png" . From this time, i can t compile for release mode because i m facing the following issue with gradle :

18:04:27.715 [INFO] [org.gradle.api.Project] Unknown source file : res\drawable-mdpi-v4\assets_downarrow.png:0: error: Resource entry assets_downarrow is already defined.
18:04:27.726 [INFO] [org.gradle.api.Project] Unknown source file : res\drawable-mdpi-v4\assets_downarrow.jpg:0: Originally defined here.

since i have no folder "drawable-mdpi-v4" in the android resources folder i guess react native push my assets into this folder but the problem is i only have the "downArrow.png" left, the jpg one has already delete from the git.

I restarted the react-native packager and also ran the following command : cd Android && ./gradlew clean build assemble

but the problem still remain.

any idea ?

3 Answers 3

1

Okay So finally launched Android studio and trigger the clean / build / invalidate cache actions and everyrhing works fine now

Sign up to request clarification or add additional context in comments.

Comments

1

I solved by: cd android/ && ./gradlew clean && cd .. && react-native run-android

Comments

0

Solved, That means you have downarrow.jpg and downarrow.png, You should remove or rename one of them because drawable is handling images without file extension.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.