Gradlew bundleRelease doesnt generate release apk in react-native

hakan picture hakan · Jun 13, 2019 · Viewed 18.1k times · Source

I try to get apk of app. I did it before well. However, I tried to use get apk of other app today but it doesnt give me release apk. why ?

I followed these steps : enter link description here

Normally, it takes 2-3 minutes but now it lasts just 3 sec and doesnt generate apk

it says this :

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/5.4.1/userguide/command_line_interface.html#sec:command_line_warnings

Answer

Enes Öztürk picture Enes Öztürk · Jul 24, 2019

I had the same problem. Following command worked for me:

After the ./gradlew bundleRelease command we get a .aab version of our app. To get APK, you should run the app with release version on any device with the below command.

  • Make sure you have connected an android device
  • For the production ready app, firstly you have to remove the previous app from the device

Run this command in your-project/:

react-native run-android --variant=release

Then APK can be found in android/app/build/outputs/apk/release

Hope this helps