Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradlew bundleRelease doesnt generate release apk in react-native

Tags:

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

like image 882
hhh Avatar asked Jun 13 '19 08:06

hhh


People also ask

What is Gradlew bundleRelease?

./gradlew bundleRelease. Gradle's bundleRelease will bundle all the JavaScript needed to run your app into the AAB (Android App Bundle).


1 Answers

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

like image 149
Enes Öztürk Avatar answered Oct 04 '22 00:10

Enes Öztürk