I have made a project with react native. now I want to generate an apk. but there isn’t any generated icon as below picture and also there isn’t exist Gradle script at the root of my project.
I think the Gradle script does not in the root project, is this the problem with Gradle?
Open android folder in android studio, you will see Gradle, libraries and can build apk, also if you want to generate a release apk you can do it with this command in android folder directory ./gradlew assembleRelease or gradlew assembleRelease
2
Answers
Open android folder in android studio, you will see Gradle, libraries and can build apk, also if you want to generate a release apk you can do it with this command in android folder directory
./gradlew assembleRelease
orgradlew assembleRelease
Run
npx react-native run-android --variant=release
from the android folder.You can find the apk in: