Search code examples
react-nativeapk

Change icon of application developed with react native


I want to change my default icon's app to another one and generate my standalone app (with expobuild:android)

But when I add another image(capture) in my assets folder and replace it in app.js,it gives me an error:

{
  "expo": {
   
    "icon": "./assets/capture.png",
  }}

I tried many time with and without default icon (I have error just with new image) so i'm sure that error came from the change of icons.

Do you have any idea ;


Solution

  • if you are using a CRNA solution, there is an easy way you can do it. Just go into the /assets folder and just paste there your new icon, then rename it to icon.png, just make sure you already removed the default one. It also works with the splash screen. But if you created your project with create-react-native-app, you need to do it separatly in Android studio for Android and Xcode for iOS. See more with this link wich helped me too. https://aboutreact.com/react-native-change-app-icon/ Hope it's gonna help ... Regards