MPAndroidChart icon indicating copy to clipboard operation
MPAndroidChart copied to clipboard

Cannot use com.github.mikephil.charting.charts.LineChart

Open nyhmii opened this issue 6 years ago • 2 comments

<com.github.mikephil.charting.charts.LineChart android:id="@+id/mpChart" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_below="@+id/BtnShowStats" android:layout_margin="10dp" />

not recognized when trying to use it?

Please help

nyhmii avatar May 28 '19 10:05 nyhmii

The com.github.mikephil.charting.charts.LineChart part

nyhmii avatar May 28 '19 10:05 nyhmii

I faced the same issue and posting here the answer, I successfully added the build.gradle.kts file like this implementation("com.github.PhilJay:MPAndroidChart:v3.1.0") yet I face the issue that Cannot use com.github.mikephil.charting.charts.LineChart. This mean the library was not properly downloaded. The reason that I had to add the jitpack.io reference in my settings.gradle. So I added jitpack.io reference in my settings.gradle.kts file like this

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

And after syncing the issue is resolved.

abdul-rehman-2050 avatar Jun 05 '24 13:06 abdul-rehman-2050