I did yarn run eject to eject but it gave me this warning
Warning! We found at least one file where your project imports the Expo SDK
I know I have some modules which use Expo API like this -
await Expo.Font.loadAsync({
Roboto: require('native-base/Fonts/Roboto.ttf'),
Roboto_medium: require('native-base/Fonts/Roboto_medium.ttf'),
});
Now I want to convert this to React Native Components so that I can eject without any errors so that I get
index.android.js & index.ios.js in the root folder like we do while using react-native init example
After 4 hours, I got the answer.. :yum:
Had to install exp using npm i -g exp & then used exp detach to detach the project
Also I added some fields in app.json for it to work as follows
{
"expo": {
"name": "Project",
"slug": "project",
"sdkVersion": "18.0.0",
"privacy": "public",
"android": {
"package": "com.example.project"
}
}
}
Docs are given here
SideNote: It doesn't create the folder structure like when done using react-native init... It creates android & ios folders respectively.
IS your detach sucess how you able build apk after detach?
Can we run it using react-native run-android?
IS your detach sucess how you able build apk after detach?
Yep detach was successful. Follow this for building apk after detach.
Can we run it using react-native run-android?
Not sure what you're saying. But if I remember, npm start will do the job.
Docs link is not working ...
404
This page could not be found.
Try again
@deadcoder0904 , what about size of apk? like its normal expo size apk of 25 mb or less
Most helpful comment
After 4 hours, I got the answer.. :yum:
Had to install
expusingnpm i -g exp& then usedexp detachto detach the projectAlso I added some fields in
app.jsonfor it to work as followsDocs are given here
SideNote: It doesn't create the folder structure like when done using
react-native init... It createsandroid&iosfolders respectively.