1

I tried to add "MPAndroidChart" library in Eclipse but when I try to import this lib:(https://github.com/PhilJay/MPAndroidChart/archive/master.zip) .

Amongst the downloaded files , I found a folder called "MPChartLib". This is the actual library folder, I need to add this folder to my project to be able to use the full functionality of the library.

I tried to import the library folder into my workspace, using File-->Import-->Android-->Existing Android but I have this message " Select at least one project eclipse import" !!!!

Mohit Kanwar
  • 2,962
  • 7
  • 39
  • 59
Achrez
  • 33
  • 2
  • 10
  • It is a gradle project. You need to import it as is (assuming you already have installed the [Gradle Integration for Eclipse](https://marketplace.eclipse.org/content/gradle-integration-eclipse-0)) – Gábor Bakos Jul 13 '15 at 09:17
  • Gradle is bit confusing to me and also for new Android developer. Can anyone explain what gradle ? – Achrez Jul 13 '15 at 11:39

3 Answers3

0

The lib uses gradle, because of that you can't "import a eclipse project"

You have 2 options, install a gradle plugin for eclipse, or use the lib as a jar


From the lib README:

Download the latest .jar file from the releases section Copy the mpandroidchartlibrary-.jar file into the libs folder of your Android application project Start using the library

letz
  • 1,762
  • 1
  • 20
  • 40
  • Ok i'l try now thnx :) – Achrez Jul 13 '15 at 11:33
  • Gradle is bit confusing to me and also for new Android developer. Can anyone explain what gradle ? – Achrez Jul 13 '15 at 11:38
  • @Achrez gradle manages your lib dependencies (import libs without importing the hole project like eclipse) and works like ant, define routines (tasks) that you execute often. If you are new Android developer, I recommend you to use Android Studio instead of Eclipse – letz Jul 13 '15 at 11:40
  • thnx @letz i'm not new but i worked by android in the past and now i'm refreshing my memory ;) thnx for help – Achrez Jul 13 '15 at 11:47
  • When i add this .jar and i import the example in the folder i have some problem with some method ?? – Achrez Jul 14 '15 at 08:00
0

I hope the same named file is already there or else you can do one thing check the file name to the New Project Name column and check the same file name in your workspace. I must say you that the same named file is definitely there.

So once you will find this, just rename your file name into your workspace and try again importing this.

I hope this will work for you. Any help will be needed, do let me know.

Parth Bhayani
  • 1,894
  • 3
  • 17
  • 35
0

"Select at least one project eclipse import" this message inform you that you have already added Lib in Work Space check for already added "MPChartLib" Lib followed this step:-

  1. Write click on your project and select Properties.
  2. On left select Android.
  3. In Android->Library section click Add
  4. Select for "MPChartLib" (note: name can be change).

Or If you unable to find lib please make new workspace if possible then import MPAndroidChart on workspace.

Neeraj Singh
  • 610
  • 9
  • 15