Estimote / react-native-proximity

React Native wrapper for Estimote Proximity SDK
Apache License 2.0
61 stars 38 forks source link

RN 0.70.6 run-android error - Could not find com.estimote:proximity-sdk:1.0.3 #67

Closed nbastoWM closed 1 year ago

nbastoWM commented 1 year ago

HI,

I just created a clean new RN v0.70.6 app and added the react-native-proximity v0.6.0 and when I try to run it on Android, it shows me a build error:

* What went wrong:
Could not determine the dependencies of task ':app:processDebugResources'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
   > Could not find com.estimote:proximity-sdk:1.0.3.
     Searched in the following locations:
       - file:/Users/nuno/wm/testes/teste070/node_modules/react-native/android/com/estimote/proximity-sdk/1.0.3/proximity-sdk-1.0.3.pom
       - file:/Users/nuno/wm/testes/teste070/node_modules/jsc-android/dist/com/estimote/proximity-sdk/1.0.3/proximity-sdk-1.0.3.pom
       - https://repo.maven.apache.org/maven2/com/estimote/proximity-sdk/1.0.3/proximity-sdk-1.0.3.pom
       - https://dl.google.com/dl/android/maven2/com/estimote/proximity-sdk/1.0.3/proximity-sdk-1.0.3.pom
       - https://www.jitpack.io/com/estimote/proximity-sdk/1.0.3/proximity-sdk-1.0.3.pom
     Required by:
         project :app > project :estimote_react-native-proximity
   > Could not find com.estimote:scanning-plugin:0.25.2.
     Searched in the following locations:
       - file:/Users/nuno/wm/testes/teste070/node_modules/react-native/android/com/estimote/scanning-plugin/0.25.2/scanning-plugin-0.25.2.pom
       - file:/Users/nuno/wm/testes/teste070/node_modules/jsc-android/dist/com/estimote/scanning-plugin/0.25.2/scanning-plugin-0.25.2.pom
       - https://repo.maven.apache.org/maven2/com/estimote/scanning-plugin/0.25.2/scanning-plugin-0.25.2.pom
       - https://dl.google.com/dl/android/maven2/com/estimote/scanning-plugin/0.25.2/scanning-plugin-0.25.2.pom
       - https://www.jitpack.io/com/estimote/scanning-plugin/0.25.2/scanning-plugin-0.25.2.pom
     Required by:
         project :app > project :estimote_react-native-proximity

The app is completly clean with no extra packages.

nbastoWM commented 1 year ago

OK, I think I got it. I had to add jcenter() to the repositories in android/build.gradle

allprojects {
    repositories {
        mavenCentral()
        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' }
    }
}