Could not determine the dependencies of task ':logrocket_react-native:compileDebugAidl'

221 Views Asked by At

I installed

logrocket/react-native 

and add to android/build.gradle

maven { url "https://storage.googleapis.com/logrocket-maven/" }

once all that is done i run my react native project on android but it keeps failing with this error

BUILD FAILED in 34s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':logrocket_react-native:compileDebugAidl'.
> Could not resolve all task dependencies for configuration ':logrocket_react-native:debugCompileClasspath'.
   > Could not find com.logrocket:logrocket:1.18.0.
     Required by:
         project :logrocket_react-native
  • tried to uninstall the nodemodule
  • tried to clear gradlew
  • increasing the logrocket/react-native version to 1.18.0, 1.19.0,1.19.2

this should have built and could yarn android built my app.

2

There are 2 best solutions below

2
Erkhembayar Gantulga On

Could not find com.logrocket:logrocket:1.18.0

I think it means maven may not configured properly for logrocket.

You can try by adding the following to the android/build.gradle

allprojects {
  repositories {
      maven { url "https://storage.googleapis.com/logrocket-maven/" }
  }
}

It seems it's ok to have multiple allprojects.repositories in the build.gradle

0
jgregory-apogee On

I hit the same issue: My android/build.gradle already had:

buildscript {
    // ...
    repositories {
        google()
        mavenCentral()
    }
}

I initially added the maven { ... } line from the LogRocket docs to this block. But note that the top-level key here is buildscript, while the LogRocket docs specify allprojects.

In my case, I was able to get it working by adding a whole new allprojects section to the end of my build.gradle:

// ...

allprojects {
    repositories {
        maven { url "https://storage.googleapis.com/logrocket-maven/" }
    }
}