Deepthi Sareddy
Deepthi Sareddy

Reputation: 11

How to overcome the 'dependencyResolutionManagement() method not found' error when building a React Native native Android module with TomTom Maps?

React-native native android module. Facing several errors with this https://developer.tomtom.com/android/maps/documentation/overview/project-set-up . Trying to build a native android module for React native project. Can anyone tell me where to add this piece of code

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        maven {
            url = uri("https://repositories.tomtom.com/artifactory/maven")
        }
    }
}

in which file?build.gradle of app?build.gradle of project?settings.gradle?
wherever I add it is showing this following error...

Could not find method dependencyResolutionManagement() for arguments [build_2lvry1fw81l4zm1hlike242ly$_run_closure2@35c8b4b1] on root project 'CheckFragNativeComp' of type org.gradle.api.Project.

Can someone help resolving this error? Tried the following

  1. Created new RN project and tried to modify android folder
  2. created seperate android project and tried to integrate existing app to RN

Upvotes: 1

Views: 1624

Answers (2)

newbie
newbie

Reputation: 959

Try to update your Android studio. I have same the problem, but I tried to update the Android studio to koala, everything is work well.

Upvotes: 0

Ioana Kanda
Ioana Kanda

Reputation: 1

You will need to place this code snippet in settings.gradle as instructed here.

Upvotes: 0

Related Questions