paytabscom / react-native-paytabs-library

Bridge library for native IOS/Android Paytabs libraries
https://site.paytabs.com/en/
MIT License
15 stars 15 forks source link

solve issues in react native #17

Open mohamedanwer123 opened 3 years ago

mohamedanwer123 commented 3 years ago

"android "

if you get these errors

Screen Shot 2021-04-25 at 12 10 08 error2

1) in android/build.gradle

add

allprojects { repositories { mavenLocal() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url("$rootDir/../node_modules/react-native/android") } maven { // Android JSC is installed from npm url("$rootDir/../node_modules/jsc-android/dist") }

    google()
    jcenter()
    maven { url 'https://www.jitpack.io' }

    /***************PAYTABS*************/
    maven {
        url  "https://dl.bintray.com/paytabsandroidsdk/paytabs-sdk"
    }
    maven { url "http://pay.cards/maven" }
    /****************************/
}

}

2) in android/app/build.gradle

android: {

/**PAYTABS/ configurations.all { resolutionStrategy { exclude group: "org.jetbrains.kotlinx", module: "kotlinx-coroutines-debug" } } packagingOptions { pickFirst '*/.so' } /****/

}

at the end make clean and rebuild then run

"ios"

if you get this error

Screen Shot 2021-04-25 at 13 47 10

Right click on your root project in the Project Navigator Select 'New File' Select a 'Swift File' Give it a name of 'BridgeHeader' (you don't need to specify the .swift - it'll add the extension automatically)

at the end make clean then run