"expo" in app.json can't take effect

#1

Here is my app.json

{
“expo”: {
“sdkVersion”: “21.0.0”,
“packagerOpts”: {“assetExts”: [“ttf”] },
“orientation”: “portrait”,
“primaryColor”: “#ff0000
}
}

the keys such orientation or primaryColor can’t effect in my app.
Did app.json take effect on development before eject?

0 Likes

#2

app.json replaced exp.json. in app.json, the expo stuff goes under an "expo" key, but otherwise its basically the same.

anything you want to do like orientation, etc. can be done in app.json. orientation and primaryColor should work with app.json just fine. https://docs.expo.io/versions/latest/guides/configuration.html

If they aren’t working right, maybe there is a problem with your configuration or with expo.

did you try closing and reopining xde and reopening your project in it? just to make sure the configuration changes were picked up.

0 Likes

#3

I open my project on my devices instead of xde.

Can app.json take effect on device?

I reopen my device many times, but they didn’t work right.

Hm,I read docs more time, but I didn’t find solution.

When I deleted the app.json and reopened the project, there is error which is no app.json .
BTW, I used CRNA to develop.

0 Likes

#4

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)

0 Likes

#5

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)

0 Likes

#6

Just now, I find the key of expo about app.json can effect project on Mac. I used Linux.

0 Likes