I'm making simple react-native app.
I tried to upload my application on Google Play Store, but failed.
I followed this documentation. As it said, I typed ./gradlew buildRelease
on terminal. It results below.
> Configure project :react-native-voice
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: Configuration 'testCompile' is obsolete and has been replaced with 'testImplementation'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: The specified Android SDK Build Tools version (23.0.2) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.3.1.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '23.0.2'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
> Task :app:bundleReleaseJsAndAssets
warning: the transform cache was reset.
Loading dependency graph, done.
info Writing bundle output to:, /Users/mac88/Desktop/Projects/voice-car-v2/NativeApp/android/app/build/generated/assets/react/release/index.android.bundle
info Done writing bundle output
info Copying 13 asset files
info Done copying assets
> Task :react-native-gesture-handler:compileReleaseJavaWithJavac
Note: /Users/mac88/Desktop/Projects/voice-car-v2/NativeApp/node_modules/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerButtonViewManager.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
BUILD SUCCESSFUL in 29s
63 actionable tasks: 10 executed, 53 up-to-date
Yes, it show BUILD SUCCESSFULL in 29s
! but there is no android/app/build/outputs/bundle/release/app.aab
or in any folder.
How to get app.aab
file?
Go to your android/app folder in terminal and create a debug key with the below code, So for production ready code, go to the root of your react native app folder and copy and paste the code below in terminal and do as follows, The alias name must be set by you.
Use gradlew bundleRelease to generate an app bundle (.aab file) and gradlew assembleRelease to generate an apk (.apk file). To install a release on your emulator, use react-native run-android --variant=release. I hope this helps Show activity on this post. I made a file that called build.sh .
So for production ready code, go to the root of your react native app folder and copy and paste the code below in terminal and do as follows, The alias name must be set by you.
If you are migrating from previous version of React Native chances are your app does not use App Signing by Google Play feature. We recommend you enable that in order to take advantage from things like automatic app splitting.
If you're trying to create a *.aab you need to use bundleRelease
not buildRelease
That will create the .aab as you are expecting.
When you generate android apk using ./gradlew buildRelease
it automatically save in your project android/app/build/outputs/apk/release
folder you can find app-release.apk
if apk is generate successfully.
Another option is when you generate apk using android studio
it give you options to save your apk in selected folder or directories.
Thanks
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With