Create apk file with android studio in react native

 1:First of all go to RN  official site and search publish to google playstore

 2:then copy Setting up Gradle variables 

MYAPP_UPLOAD_STORE_FILE=my-upload-key.keystore

MYAPP_UPLOAD_KEY_ALIAS=my-key-alias

MYAPP_UPLOAD_STORE_PASSWORD=*****

MYAPP_UPLOAD_KEY_PASSWORD=*****

and paste into Android/gradle.properties

3:then give it the name and password

MYAPP_UPLOAD_STORE_FILE=mykeystore
MYAPP_UPLOAD_KEY_ALIAS=key1
MYAPP_UPLOAD_STORE_PASSWORD=123456
MYAPP_UPLOAD_KEY_PASSWORD=123456

4: then add release to Android/App/build.gradle in signingConfigs{*****}

Adding signing config to your app's Gradle config​

The last configuration step that needs to be done is to setup release builds to be signed using upload key. Edit the file android/app/build.gradle in your project folder, and add the signing config,

...
android {
...
defaultConfig { ... }
signingConfigs {
//add this lines
release {
if (project.hasProperty('MYAPP_UPLOAD_STORE_FILE')) {
storeFile file(MYAPP_UPLOAD_STORE_FILE)
storePassword MYAPP_UPLOAD_STORE_PASSWORD
keyAlias MYAPP_UPLOAD_KEY_ALIAS
keyPassword MYAPP_UPLOAD_KEY_PASSWORD
}
}
//******************
}
buildTypes {
release {
...
signingConfig signingConfigs.release
}
}
}
...

5:now open Android folder into android studio... note:::not project only open android folder in to android studio its required internet you must have internet connection

6:click on build and select Generate signed bundle /apk 

7:now selct apk  then click on next

8:if you have keystore file then selct the path if you dont have then click the CREATE NEW 

9:now select the path where you want to create keystore file 

10:keystore file is must in App folder now select projects app folder and create the path like this

E:\New React Native Folder\FB_signIn\android\app\mykeystore.jks

 keystorefile  name and passoword and key alias  is same where you type into gradle.properties

MYAPP_UPLOAD_STORE_FILE=mykeystore //this one
MYAPP_UPLOAD_KEY_ALIAS=key1 //this one
MYAPP_UPLOAD_STORE_PASSWORD=123456 //this one
MYAPP_UPLOAD_KEY_PASSWORD=123456 //this one

11:then click the next next and select the===>>> release then click the next

12 last step after successfuly build you can get release app from projectname/android/app  


Popular posts from this blog

PST JST Prep - Sindh Teachers Privacy Policy

NFC Checker App Privacy Policy

Privacy Policy for Live Weather Forecast - Realtime app