How to Add MPAndroid Chart to Android Studio Dolphin?

  • Thread starter Thread starter Darkmisc
  • Start date Start date
  • Tags Tags
    Set
AI Thread 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 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.

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
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I had a Microsoft Technical interview this past Friday, the question I was asked was this : How do you find the middle value for a dataset that is too big to fit in RAM? I was not able to figure this out during the interview, but I have been look in this all weekend and I read something online that said it can be done at O(N) using something called the counting sort histogram algorithm ( I did not learn that in my advanced data structures and algorithms class). I have watched some youtube...
Back
Top