- #1
Darkmisc
- 220
- 31
- TL;DR Summary
- I've tried to set up MPAndroid Chart, but Android Studio says it's not found in the libraries. I've followed instructions as best I can, but my Gradle module doesn't have a repositories section.
Hi everyone
Can someone show me how to add MPAndroid Chart to Android Studio Dolphin?
I've tried following the instructions given at https://www.geeksforgeeks.org/how-to-create-a-barchart-in-android/
Navigate to the Gradle Scripts > build.gradle(Module:app) and add the below dependency in the dependencies section.
I don't have a allprojects or repositories sections, so I just pasted
repositories {
…
maven { url “https://jitpack.io” }
}I don't think it worked. In my pie chart xml, it says com.github.mikephil.charting.charts.PieChart was not found in projects or libraries.
I also tried the example at https://javapapers.com/android/android-chart-example-app-using-mpandroidchart/
This example makes no mention of repositories, but I get the same result.
<com.github.mikephil.charting.charts.PieChart is not found in projects or libraries.What am I doing wrong?Thanks
Can someone show me how to add MPAndroid Chart to Android Studio Dolphin?
I've tried following the instructions given at https://www.geeksforgeeks.org/how-to-create-a-barchart-in-android/
Navigate to the Gradle Scripts > build.gradle(Module:app) and add the below dependency in the dependencies section.
Add the JitPack repository to your build file. Add it to your root build.gradle at the end of repositories inside the allprojects{ } section.implementation ‘com.github.PhilJay:MPAndroidChart:v3.1.0’
allprojects {
repositories {
…
maven { url “https://jitpack.io” }
}
}
I don't have a allprojects or repositories sections, so I just pasted
repositories {
…
maven { url “https://jitpack.io” }
}I don't think it worked. In my pie chart xml, it says com.github.mikephil.charting.charts.PieChart was not found in projects or libraries.
I also tried the example at https://javapapers.com/android/android-chart-example-app-using-mpandroidchart/
This example makes no mention of repositories, but I get the same result.
<com.github.mikephil.charting.charts.PieChart is not found in projects or libraries.What am I doing wrong?Thanks