diff --git a/README.md b/README.md index 561b5ac..f9cdc5a 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ yarn add react-native-upi-payment ### Android #### Automatic Installation ``` -react-native run link +react-native link ``` #### Manual Installation @@ -31,25 +31,28 @@ project(':react-native-upi-payment').projectDir = new File(rootProject.projectDi ``` -Open `android/build.gradle` add the following in the dependencies section +Open `android/app/build.gradle` add the following in the dependencies section ``` dependencies { - compile project(':react-native-upi-payment') + implementation project(':react-native-upi-payment') } ``` -Open `MainApplication.java` +Open `android/app/src/main/java/com//MainApplication.java` ```java // Other imports import com.upi.payment.UpiPaymentPackage; + // Do this when the package is not auto added // Add this in the Main Application Class @Override protected List getPackages() { - return Arrays.asList( - //... Other packages - new UpiPaymentPackage() // <- Add this line - ); + // ... + List packages = new PackageList(this).getPackages(); + + packages.add(new UpiPaymentPackage()) // <- Add this line + + return packages; } ``` diff --git a/android/build.gradle b/android/build.gradle index eaa27a3..a1ec545 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -30,7 +30,7 @@ android { } dependencies { - compile "com.facebook.react:react-native:+" // From node_modules - compile 'com.google.code.gson:gson:2.8.0' + implementation "com.facebook.react:react-native:+" // From node_modules + implementation 'com.google.code.gson:gson:2.8.0' }