forked from PDA-Open-Source/PDA-MOBILE
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
vky25 edited this page Apr 19, 2022
·
1 revision
Welcome to the PDA-MOBILE wiki!
- Install ReactNative version 0.59.0 with following command
- npm install -g [email protected]
-
Make the following changes to the library’s version in package.json
- Under dependencies
- "react-native-pdf": "^6.0.1" -> "react-native-pdf": "^5.0.9"
- Under dependencies
-
Under devDependencies
- "@babel/core": "7.4.5" -> "@babel/core": "7.16.12"
- "@babel/runtime": "7.4.5" -> "@babel/runtime": "7.16.7"
- "jest": "24.8.0" -> "jest": "27.4.7"
- "metro-react-native-babel-preset": "0.54.1" -> "metro-react-native-babel-preset": "^0.67.0"
-
Add the following libraries using yarn add
- @react-native-community/toolbar-android
- Fbjs
- jetifier
- react-native-blob-util
-
Add the following command in the script section
- "postinstall": "npx jetify"
-
Add the following to the android/gradle.properties
- android.useAndroidX=true
- android.enableJetifier=true
-
Make the following changes to the android/build.gradle file
- buildToolsVersion = "28.0.2" -> buildToolsVersion = "28.0.3"
- classpath 'com.android.tools.build:gradle:3.4.1' -> classpath 'com.android.tools.build:gradle:3.4.0'
-
Make the following changes to the MainApplication.java file
- import android.support.multidex.MultiDex; -> import androidx.multidex.MultiDex;
- import android.support.multidex.MultiDexApplication; -> import androidx.multidex.MultiDexApplication;
- Add the following permission in android/app/src/main/AndroidManifest.xml
In the root directory, install dependencies using following command yarn install-all
- Change the following line as mentioned
- Line no:107 => let phoneNumberSizeMin = 10;
- Line no:108 => let phoneNumberSizeMax = 11;
- Comment out the Line no:112 and 113
- Change the following line as mentioned
- Line no:134 => let phoneNumberSizeMin = 10;
- Line no:135 => let phoneNumberSizeMax = 11;
- Comment out the Line no:139 and 140
These changes are necessary as these fields are not available in the backend but are being checked in the frontend so to make the check pass we are making this change.
Note: These changes are available in GitHub Branch, “ARGH-AndroidX-Migration” in PDA-MOBILE repo