achartengine demo compiling, but runtime error

独自空忆成欢 提交于 2019-11-29 09:25:18

I found a good answer on google groups, tested it and it seems to be working:

The only thing that I have ever came across in this case is the export of the jar ... if that makes sense.

In Eclipse:

  1. Right click your project - go to build path - select Configure build path
  2. go to the "Order and Export" tab
  3. Check the "achartengine-1.0.0.jar box and then single click its name
  4. move it up so its right below the Android dependancies (sometimes this can make a difference if you have multiple Jars)

click ok then clean your project. (Project -> Clean...)

chenmo

Remind to change the "lib" directory to "libs" first !

Then CHECK the box of achartengine-1.0.0.jar and move it over the Android Dependencies in the "Configure build path" - "Order and Export" tab"!

The error (NoClassDefFoundError) you are seeing is runtime error. Referenced library solves only compile time error not runtime error. Add those jars to lib folder of your project. Those jars should be available at runtime also.

NMKloster

The answer from 'Shine' worked with the addition of removing import of android.R from PieChartBuilder and removing two @Overrides from PieChartBuilder and XY_ChartBuilderbefore Eclipse would agree to compile.

Harneet Kaur

You need simply to add your jar files to the Libraries folder. It should work fine.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!