Everyday-Programmer / Mapbox-Android-Java

This repository contains code of mapbox map implementation in android studio using java.
GNU General Public License v3.0
3 stars 2 forks source link

authentication { basic(BasicAuthentication) } is worng. Please help me. #1

Open freshmanMrxin opened 2 months ago

freshmanMrxin commented 2 months ago

I learned your mapbox configuration tutorial on youtube, I found an authentication {basic(BasicAuthentication)} error while doing it myself, here is my error message: 1. Unresolved reference: basic; 2. Function invocation 'BasicAuthentication(...)' expected; 3. No value passed for parameter 'function'. Could you please tell me how to modify it, thank you very much.

freshmanMrxin commented 2 months ago

This is my settings.gradle code: pluginManagement { repositories { google { content { includeGroupByRegex("com\.android.") includeGroupByRegex("com\.google.") includeGroupByRegex("androidx.*") } } mavenCentral() gradlePluginPortal() } } dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { google() mavenCentral() maven { url = uri("https://api.mapbox.com/downloads/v2/releases/maven") // Do not change the username below. It should always be "mapbox" (not your username).

        credentials.username = "mapbox"
        // Use the secret token stored in gradle.properties as the password
        credentials.password = providers.gradleProperty("MAPBOX_DOWNLOADS_TOKEN").get()
        authentication { basic(BasicAuthentication) }
    }
}

}

rootProject.name = "ApplicationSet" include(":app")