Search code examples
javaandroidkotlinmapmyindia-api

How I can use MapMyIndia in kotlin?


I can't use MapMyIndia in kotlin, I need to know how I can install it.

Now in my code I got this:

Project level build.gradle

maven {
            url 'https://maven.mapmyindia.com/repository/mapmyindia/'
        }

App level dependency build.gradle

implementation 'com.mapmyindia.sdk:mapmyindia-android-sdk:6.8.2'

But when I want to use anything with MapMyIndia on my activity or xml I got none about it.


Solution

  • There is one more place where you should import the.

    in settings.gradle Project Settings and should look something like this

    pluginManagement {
        repositories {
            gradlePluginPortal()
            google()
            mavenCentral()
        }
    }
    dependencyResolutionManagement {
        repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
        repositories {
            google()
            mavenCentral()
            maven { url 'https://maven.mapmyindia.com/repository/mapmyindia/' }
        }
    }
    rootProject.name = "This is Sparta"
    include ':app'
    
    

    That should do the trick.