PayHereLK / payhere-mobilesdk-reactnative

PayHere Mobile SDK for React Native
8 stars 6 forks source link

Build failed due to Could not get resource #6

Closed damithg-dev closed 3 years ago

damithg-dev commented 3 years ago

As below, when running the android build, it got failed.

`

Could not resolve all artifacts for configuration ':app:debugRuntimeClasspath'. Could not resolve lk.payhere.sdk:android-payment-sdk:2.0.31. Required by: project :app > project :payhere_payhere-mobilesdk-reactnative Could not resolve lk.payhere.sdk:android-payment-sdk:2.0.31. Could not get resource 'https://dl.bintray.com/payhere/payhere-android-payment/lk/payhere/sdk/android-payment-sdk/2.0.31/android-payment-sdk-2.0.31.pom'. Could not GET 'https://dl.bintray.com/payhere/payhere-android-payment/lk/payhere/sdk/android-payment-sdk/2.0.31/android-payment-sdk-2.0.31.pom'. Received status code 403 from server: Forbidden `

version: "payhere/payhere-mobilesdk-reactnative": "1.0.8",

PayHereDevs commented 3 years ago

Dear @damithg-dev,

The hosting service for the PayHere Android SDK used internally by the ReactNative SDK is no longer available via bintray.com as it is being shutdown by owner, JFrog.

Our Android team is working on releasing an update soon. Once it is released, the React-Native SDK will receive an update as well.

Until then, please bare with us. We apologize for the inconvenience caused.

PayHereDevs commented 3 years ago

Dear @damithg-dev,

Please update to the latest version of the PayHere React Native SDK and try again. An updated version has been released fixing these issues.

{
  "dependencies": {
    "@payhere/payhere-mobilesdk-reactnative": "1.0.10"
  }
}

Further, note that you will need to modify your Android project's outer-most build.gradle file to switch to the new PayHere Android SDK's Repo (these changes are also mentioned in the 2. Android Pre-requisites section).

Open up the (outermost) build.gradle file in your Android project and add the repository.

allprojects {
    repositories {
        mavenLocal()
        maven {
            // New URL and credentials section.
            url  'https://maven.pkg.github.com/PayHereLK/payhere-mobilesdk-android'
            credentials {
                username = 'PayHereDevs'
                password = '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'
            }
        }
    }
}

If you have any further issues, please let us know within a few days so we can make quick changes. Once more, thank you for bringing issue to our attention.

PayHereDevs commented 3 years ago

Hello @damithg-dev,

Please note there has been a small patch fix. The new version is as follows.

{
  "dependencies": {
    "@payhere/payhere-mobilesdk-reactnative": "1.0.11"
  }
}

We migrated from GitHub Packages and the SDK is now hosted at a new repository. So you won't need the "credentials" section anymore. Please update the main build.gradle file as follows.

allprojects {
    repositories {
        mavenLocal()
        maven {
            // New URL.
            url  'https://repo.repsy.io/mvn/payhere/payhere-mobilesdk-android/'
        }
    }
}
damithg-dev commented 3 years ago

@PayHereDevs the second solution was to resolve my issues. Thank you attend the issue imdietaly.