How to Add MPAndroid Chart to Android Studio Dolphin?

  • Thread starter Thread starter Darkmisc
  • Start date Start date
  • Tags Tags
    Set
Click For Summary
To add MPAndroid Chart to Android Studio Dolphin, users need to include the dependency in the build.gradle file for the app module: implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'. Additionally, the JitPack repository must be added to the root build.gradle file within the allprojects section. If the allprojects or repositories sections are missing, users should create them accordingly. Issues may arise if the repository is not correctly configured, leading to errors like "com.github.mikephil.charting.charts.PieChart not found." A solution was found through a Stack Overflow link, indicating the importance of proper repository setup for successful integration.
Darkmisc
Messages
222
Reaction score
31
TL;DR
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.

implementation ‘com.github.PhilJay:MPAndroidChart:v3.1.0’
Add the JitPack repository to your build file. Add it to your root build.gradle at the end of repositories inside the allprojects{ } section.

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
 
Technology news on Phys.org
Learn If you want to write code for Python Machine learning, AI Statistics/data analysis Scientific research Web application servers Some microcontrollers JavaScript/Node JS/TypeScript Web sites Web application servers C# Games (Unity) Consumer applications (Windows) Business applications C++ Games (Unreal Engine) Operating systems, device drivers Microcontrollers/embedded systems Consumer applications (Linux) Some more tips: Do not learn C++ (or any other dialect of C) as a...

Similar threads

  • · Replies 17 ·
Replies
17
Views
2K
Replies
3
Views
1K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 51 ·
2
Replies
51
Views
5K
  • · Replies 1 ·
Replies
1
Views
4K
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K