From 11b42572cc6d3add832f78a46b4d245fbded2ec6 Mon Sep 17 00:00:00 2001 From: Khavin Shankar Date: Mon, 18 Apr 2022 08:57:26 +0530 Subject: [PATCH 1/2] fix (android/build.gradle): changed compile to implementation --- android/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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' } From f315d86fd3114c298bbc028f2e506ebcc119b59b Mon Sep 17 00:00:00 2001 From: Khavin Shankar Date: Mon, 18 Apr 2022 09:09:53 +0530 Subject: [PATCH 2/2] fix (Readme): updated few minor details --- README.md | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) 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; } ```