I’m new to react native, and I just built my first mobile app (a simple D&D dice app).
but I’m not able and don’t know how to export it now as an .apk file to install it on my phone.
I’ve used Visual studio code and Expo Go to make and test the app, but now I’m stuck, help would be much appreciated 🙂
I have tried a few youtube tutorials, but I just get a lot of errors
2
Answers
To generate the APK go to the root of the project in the terminal and run the below command:
Go to android directory:
Now in this android folder, run this command
You should find the apk file in the following:
The thing is, this will generate a "debug apk" to generate a "Release APK" you will have to setup a signature for the APK, but this is only necessary when publishing to the stores, not to create a debug apk version.
As you have Expo setup use the EAS CLI –
First, you need to set up the CLI on your PC please follow the steps
https://docs.expo.dev/build/setup/
After that run the cmd as per your required platform-
or