Actually i have created an app in which i have used achartengine
to contruct graph.
It was running ok, but today i saw an update for android SDK to r17
.
Once i upadated the sdk the app i had build started crash. In the logcat i show the following error report. Why this happen, is it because the jar file i have used is deprecated.
03-27 14:44:26.320: E/AndroidRuntime(4360): java.lang.NoClassDefFoundError: [Lorg.achartengine.chart.PointStyle;
03-27 14:44:26.320: E/AndroidRuntime(4360): at in.com.example.ChartEngineActivity.onCreate(ChartEngineActivity.java:58)
03-27 14:44:26.320: E/AndroidRuntime(4360): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
03-27 14:44:26.320: E/AndroidRuntime(4360): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
03-27 14:44:26.320: E/AndroidRuntime(4360): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
03-27 14:44:26.320: E/AndroidRuntime(4360): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
03-27 14:44:26.320: E/AndroidRuntime(4360): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
03-27 14:44:26.320: E/AndroidRuntime(4360): at android.os.Handler.dispatchMessage(Handler.java:99)
03-27 14:44:26.320: E/AndroidRuntime(4360): at android.os.Looper.loop(Looper.java:130)
03-27 14:44:26.320: E/AndroidRuntime(4360): at android.app.ActivityThread.main(ActivityThread.java:3683)
03-27 14:44:26.320: E/AndroidRuntime(4360): at java.lang.reflect.Method.invokeNative(Native Method)
03-27 14:44:26.320: E/AndroidRuntime(4360): at java.lang.reflect.Method.invoke(Method.java:507)
03-27 14:44:26.320: E/AndroidRuntime(4360): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
03-27 14:44:26.320: E/AndroidRuntime(4360): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
03-27 14:44:26.320: E/AndroidRuntime(4360): at dalvik.system.NativeStart.main(Native Method)
In ADT version 18: - Right click on project and go to "Build Path" -> "Configure Build Path". In tab "Order and Export" simply select all, but deselect only android.jar. Click OK and your project is ready to go.
I just had a similar issue with ADT version 20 in Eclipse.
Why the error?
The demo project source and project are meant to be used with an earlier version of the ADT plugin.
Starting in either ADT 19 or 20, ADT began automatically setting up all of the JAR files that you place in the libs/ folder (note libs/, not lib/) as "Android Dependencies", rather than "Reference Libraries" (which you get when you right-click on a jar file and "Add to build path...".
Because of this change, the project file included with the AChartEngine sample project is outdated.
To use the sample code with ADT 20, take the following steps:
Now, plug in your device, boot up your emulator, and run it!
Also, if you select the green "Run" button on the toolbar, and it throws an error similar to "Could not find a previous configuration" (something like that, though the wording was more cryptic),
Enjoy the charts!
Here is your solution, just follow the steps from How to fix the “NoClassDefFoundError” with ADT 17 and you will be able to make it working.