Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding an external dependency on the module - Android - Help #366

Open
TfADrama opened this issue Jul 1, 2020 · 4 comments
Open

Adding an external dependency on the module - Android - Help #366

TfADrama opened this issue Jul 1, 2020 · 4 comments

Comments

@TfADrama
Copy link

TfADrama commented Jul 1, 2020

Hi
I want my react native module to import a SDK as a dependency.
In iOS it's already working, but i have little experience with android.

Im my react native module buidle.gradle i added the following repo inside the repositories object.

maven {
    url "s3://repo.pagesuite.com/android/"
    credentials(AwsCredentials) {
      accessKey = ""
      secretKey = ""
    }
 }

On the same file i added the following import to the dependencies object.

implementation "repo.android.pagesuite.com:psReaderSdkForClients:0.48"

After this, i compile the project and i see the dependencies on the external libraries and i actually can use the SDK.

The problem is, when i compile the example project it throws a dependency error:

Could not find repo.android.pagesuite.com:psReaderSdkForClients:0.48.

Searched in the following locations:
  - file:/Users/user/.m2/repository/repo/android/pagesuite/com/psReaderSdkForClients/0.48/psReaderSdkForClients-0.48.pom
  - file:/Users/user/Documents/PageSuite/project/react-native-pagesuite/example/node_modules/react-native/android/repo/android/pagesuite/com/psReaderSdkForClients/0.48/psReaderSdkForClients-0.48.pom
  - file:/Users/user/Documents/PageSuite/project/react-native-pagesuite/example/node_modules/jsc-android/dist/repo/android/pagesuite/com/psReaderSdkForClients/0.48/psReaderSdkForClients-0.48.pom
  - https://dl.google.com/dl/android/maven2/repo/android/pagesuite/com/psReaderSdkForClients/0.48/psReaderSdkForClients-0.48.pom
  - https://jcenter.bintray.com/repo/android/pagesuite/com/psReaderSdkForClients/0.48/psReaderSdkForClients-0.48.pom
  - https://www.jitpack.io/repo/android/pagesuite/com/psReaderSdkForClients/0.48/psReaderSdkForClients-0.48.pom
Required by:
    project :app > project :reactnativepagesuite

The dependency appears on the external libraries too. What am i missing?

@brodybits
Copy link
Owner

A demo project would be really helpful.

@TfADrama
Copy link
Author

TfADrama commented Jul 2, 2020

The only changes the project have are those i mentioned and a simple import for the SDK...
So, with these modifications it's suppose to work?

@zabojad
Copy link

zabojad commented Oct 22, 2020

I'm having the same issue. @TfADrama did you find a solution?

I've tried adding this to my RN module build.gradle file:

repositories {
    maven {
           url "http://mydepedency..."
           artifactUrls = ["http://jcenter.bintray.com/"]
    }
}

But it doesn't work.

@TfADrama
Copy link
Author

TfADrama commented Oct 22, 2020

I'm having the same issue. @TfADrama did you find a solution?

I've tried adding this to my RN module build.gradle file:

repositories {
    maven {
           url "http://mydepedency..."
           artifactUrls = ["http://jcenter.bintray.com/"]
    }
}

But it doesn't work.

I never found a clean solution. You must add on build.grafle of your module and on the same file of the example project. That was the only way i made it work, but i don't like it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants