Gradle project sync failed on adding MPAndroidChart library to Android Studio Iguana //2023.2.1

19 views Asked by At

A new project to create a graph was opened in Android Studio Iguana //2023.2.1. To accomplish that objective, MPAndroidChart library needs to be added to the project. These are the instructions to proceed (Source - https://medium.com/@SeanAT19/how-to-use-mpandroidchart-in-android-studio-c01a8150720f):

1 - open up the project level build.gradle file and 2 - add the following repository entry:

maven { url 'https://jitpack.io' }

Unfortunately, after the above directives were carried out, Gradle project sync failed giving the following error message:

Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
public fun RepositoryHandler.maven(url: Any, action: MavenArtifactRepository.() -> Unit): MavenArtifactRepository defined in org.gradle.kotlin.dsl

I am new to Android Studio. Can someone provide me with the coding that will resolve the above issues, please? Thanks

0

There are 0 answers