Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

how to make 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 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 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

how to make apk in android studio reac native

...
android {
    ...
    defaultConfig { ... }
    signingConfigs {
        release {
            if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) {
                storeFile file(MYAPP_RELEASE_STORE_FILE)
                storePassword MYAPP_RELEASE_STORE_PASSWORD
                keyAlias MYAPP_RELEASE_KEY_ALIAS
                keyPassword MYAPP_RELEASE_KEY_PASSWORD
            }
        }
    }
    buildTypes {
        release {
            ...
            signingConfig signingConfigs.release
        }
    }
}
...
Comment

how to make apk in android studio reac native

$ keytool -genkey -v -keystore my-release-key.keystore -alias my-key-alias -keyalg RSA -keysize 2048 -validity 10000
Comment

PREVIOUS NEXT
Code Example
Javascript :: atom javascript es6 linter 
Javascript :: how to create duplicate key array in javascript 
Javascript :: react function called last state 
Javascript :: express pourquoi mettre bodyparser avant router 
Javascript :: react native generate app hash without play console 
Javascript :: coffeescript float to two decimal places 
Javascript :: reference self in ajax callback 
Javascript :: js return undefined on ReferenceError 
Javascript :: adding a variable to a string without using + in javascript 
Javascript :: what does results.push({}) nodejs mean 
Javascript :: returned data has p tags react 
Javascript :: receiving big response node js 
Javascript :: how to set time with jwt token in node js 
Javascript :: vscode coderunner does not find python library 
Javascript :: chrome extension detect second monitor 
Javascript :: encriptar exadecimal con cryptojs 
Javascript :: js packages 
Javascript :: es6 for-of loop 
Javascript :: javascript for loop new line when getting to the end of screen 
Javascript :: android intent data as jsonobject 
Javascript :: npm react router 6.0.0-alpha.2 
Javascript :: ontouch validate angular 
Javascript :: appendchild element once if element presense in js 
Javascript :: Beginning Node.js 
Javascript :: multi auth passport stackoverflow 
Javascript :: flutter app accessible when phone is locked 
Javascript :: js map vs react js map 
Javascript :: react deployment pipeline 
Javascript :: Merger Douplicate array 
Javascript :: html link file in another folder 
ADD CONTENT
Topic
Content
Source link
Name
7+8 =