banjamin
banjamin

Reputation: 49

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 ;

Upvotes: 0

Views: 8947

Answers (2)

Lucas S.
Lucas S.

Reputation: 117

I used this this repo and cloned it, then run one line command to resize the png to all the different formats.

bash resize.sh my-cool-new-app-logo.png

Then drag the folder over and merge/replace icons.

quick insight

Upvotes: 0

pacy.eth
pacy.eth

Reputation: 176

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

Upvotes: 2

Related Questions