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
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...
Back
Top