PhilJay / MPAndroidChart

A powerful 🚀 Android chart view / graph view library, supporting line- bar- pie- radar- bubble- and candlestick charts as well as scaling, panning and animations.
Other
37.64k stars 9.02k forks source link

java.lang.AbstractMethodError: abstract method "boolean com.github.mikephil.charting.interfaces.datasets.IPieDataSet.isAutomaticallyDisableSliceSpacingEnabled() #2532

Open LT5505 opened 7 years ago

LT5505 commented 7 years ago

Thank you for your open source framework.When I click into the Realm.io example and click the Pie Chart,the application pop-up dialog box prompts the application to stop running.The SDK version is 23.

The error is shown below. E/AndroidRuntime: FATAL EXCEPTION: main Process: com.xxmassdeveloper.mpchartexample, PID: 21312 java.lang.AbstractMethodError: abstract method "boolean com.github.mikephil.charting.interfaces.datasets.IPieDataSet.isAutomaticallyDisableSliceSpacingEnabled()" at com.github.mikephil.charting.renderer.PieChartRenderer.getSliceSpace(PieChartRenderer.java:202) at com.github.mikephil.charting.renderer.PieChartRenderer.drawDataSet(PieChartRenderer.java:240) at com.github.mikephil.charting.renderer.PieChartRenderer.drawData(PieChartRenderer.java:147) at com.github.mikephil.charting.charts.PieChart.onDraw(PieChart.java:126) at android.view.View.draw(View.java:16178) at android.view.View.updateDisplayListIfDirty(View.java:15174) at android.view.View.draw(View.java:15948) at android.view.ViewGroup.drawChild(ViewGroup.java:3609) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3399) at android.view.View.updateDisplayListIfDirty(View.java:15169) at android.view.View.draw(View.java:15948) at android.view.ViewGroup.drawChild(ViewGroup.java:3609) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3399) at android.view.View.updateDisplayListIfDirty(View.java:15169) at android.view.View.draw(View.java:15948) at android.view.ViewGroup.drawChild(ViewGroup.java:3609) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3399) at android.view.View.draw(View.java:16181) at com.android.internal.widget.ActionBarOverlayLayout.draw(ActionBarOverlayLayout.java:500) at android.view.View.updateDisplayListIfDirty(View.java:15174) at android.view.View.draw(View.java:15948) at android.view.ViewGroup.drawChild(ViewGroup.java:3609) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3399) at android.view.View.draw(View.java:16181) at com.android.internal.policy.PhoneWindow$DecorView.draw(PhoneWindow.java:2690) at android.view.View.updateDisplayListIfDirty(View.java:15174) at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:281) at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:287) at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:322) at android.view.ViewRootImpl.draw(ViewRootImpl.java:2615) at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2434) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2067) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1107) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6013) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:858) at android.view.Choreographer.doCallbacks(Choreographer.java:670) at android.view.Choreographer.doFrame(Choreographer.java:606) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5417) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) qq 20161130161018 qq 20161130161026

GameChanger001 commented 7 years ago

Try cleaning the project and running it again. I also suggest you uninstall the app and reinstall as it deals with Realm DB it has issues with the values that is set.

LT5505 commented 7 years ago

Thanks for your advice,But it doesn't work for me.

PramodGarg commented 6 years ago

Facing same issue: This is because class -> com.github.mikephil.charting.data.realm.implementation.RealmPieDataSet implements IPieDataSet but does not override isAutomaticallyDisableSliceSpacingEnabled(); Hence the error " java.lang.AbstractMethodError: abstract method "boolean com.github.mikephil.charting.interfaces.datasets.IPieDataSet.isAutomaticallyDisableSliceSpacingEnabled()"