Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

react native build android apk

For apk : cd android && ./gradlew assembleRelease
For aab : cd android && ./gradlew bundleRelease
Comment

build apk react native

After run this in cmd

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/

cd android && ./gradlew assembleDebug

then you can get apk app/build/outputs/apk/debug/app-debug.apk
Comment

react native build apk

'
For apk : cd android && ./gradlew assembleRelease
For aab : cd android && ./gradlew bundleRelease
,
Comment

react native apk build

For windows, gradlew assembleRelease

For Linux, ./gradlew assembleRelease
Comment

react native release apk command

npx react-native run-android --variant=release
Comment

react-native android build apk

cd android
./gradlew assembleRelease
Comment

export apk react native

Before uploading the release build to the Play Store, 
make sure you test it thoroughly. 

mkdir -p android/app/src/main/assets
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
react-native run-android --variant=release

Export Apk -
cd android && ./gradlew bundleRelease -x bundleReleaseJsAndAssets

- Your AAB BUNDLE will be present in the folder
<project>/android/app/build/outputs/bundle/release
Comment

react-native make android apk

 cd android && ./gradlew assembleRelease
Comment

how to make apk of react native app

Debug APK
How to generate one in 3 steps?
Step 1: Go to the root of the project in the terminal and run the below command:

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

Step 2: Go to android directory:

cd android

Step 3: Now in this android folder, run this command

./gradlew assembleDebug

There! you’ll find the apk file in the following path:
yourProject/android/app/build/outputs/apk/debug/app-debug.apk

Release APK
Step 1. Generate a keystore

You can create one using the keytool in the terminal with the following command:

keytool -genkey -v -keystore your_key_name.keystore -alias your_key_alias -keyalg RSA -keysize 2048 -validity 10000

Once you run the keytool utility, you’ll be prompted to type in a password.
  *Make sure you remember the password


Step 2. Adding Keystore to your project

Copy the file your_key_name.keystore and paste it under the android/app 
directory in your React Native project folder.

On Terminal:

mv my-release-key.keystore /android/app

Release APK Generation

Place your terminal directory to android using:
cd android

For Windows,
gradlew assembleRelease

For Linux and Mac OSX:
./gradlew assembleRelease

As a result, the APK creation process is done. You can find the generated APK at
android/app/build/outputs/apk/app-release.apk.
Comment

react native apk bundle


For windows, gradlew bundleRelease 
For Linux, ./gradlew bundleRelease
Comment

build apk from react native

React Version 0.62.1
In your root project directory

Make sure you have already directory => android/app/src/main/assets/, 
if not create directory, after that 
create new file and save as index.android.bundle 
and put your file like this android/app/src/main/assets/index.android.bundle

///////////////////////
// building bundles //
//////////////////////
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/

///////////////////////
// building Debug Apk //
//////////////////////
cd android && ./gradlew assembleDebug

///////////////////////
/////Get the Apk/////
//////////////////////
cd app/build/outputs/apk/
  
  

///////////////////////
// building Release Apk //
//////////////////////
cd android && ./gradlew assembleRelease
Comment

react native create apk

Place your terminal directory to android using:

cd android
)================
For Windows, 
  gradlew assembleRelease
)=================

)=================
For Linux and Mac OSX:

./gradlew assembleRelease
)==================
Comment

create apk react native

cd android 
./gradlew assemble 

</----if this error shows up 

 Could not open settings generic class cache for settings file 
 > BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 60
Change Java version to the 8 or 11 and execute ./gradlew assembleRelease

-----/>

java -version
/usr/libexec/java_home -v 1.8.0_311 --exec javac -version
Comment

react-native make android apk

 react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript today minus 1 day 
Javascript :: typescript read url parameters 
Javascript :: Could not resolve dependency error peer react@"^16.8.0 || ^17.0.0" from @material-ui/core@4.12.4 
Javascript :: Could not find com.yqritc:android-scalablevideoview:1.0.4 react native video 
Javascript :: javascript store array in localstorage 
Javascript :: convert a string to html element in js 
Javascript :: javascript add event listener to all input 
Javascript :: jquery change font size 
Javascript :: window viewport size javascript 
Javascript :: on window resize react 
Javascript :: connection refused xmlhttprequest 
Javascript :: round till 2 digit in jquery 
Javascript :: how to get all elements with same class in javascript 
Javascript :: javascript length of object 
Javascript :: jquery set select readonly 
Javascript :: react native transparent color 
Javascript :: on change jquery 
Javascript :: how to add a right click listener javascript 
Javascript :: get input value on keypress jquery 
Javascript :: jquery datatable returning current datetime 
Javascript :: javascript get years since a date 
Javascript :: kb to mb javascript 
Javascript :: setinterval in angular 6 
Javascript :: increase font size chartjs 
Javascript :: how to wait foreach javascript 
Javascript :: separate digits in javascript 
Javascript :: javascript get hours difference between two dates 
Javascript :: before in material ui style 
Javascript :: enable version 12 node glitch 
Javascript :: get only numbers regex javascript 
ADD CONTENT
Topic
Content
Source link
Name
7+6 =