In this article i am going to tell how you can generate debug apk using bare react native application.
First you need to create app using following command
npx react-native init DebugApk
After that navigate to folder.
Check if you have android/app/src/main/assets/ if you dont have then create folder
after that create new file and save as index.android.bundle
if you are on windows
or if you are on linux
After that run following command in command prompt.
npx react-native bundle —platform android —dev false —entry-file index.js —bundle-output android/app/src/main/assets/index.android.bundle —assets-dest android/app/src/main/res/
Then navigate to android folder and type gradlew assembleDebug to generate apk.
cd android gradlew assembleDebug
You will find your app in app/build/outputs/apk/debug/ folder.