This is a migrated thread and some comments may be shown as answers.

NoClassDefFoundError DeferredZoomPresenter

6 Answers 64 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Matt
Top achievements
Rank 1
Matt asked on 18 Sep 2015, 05:15 PM

I am able to draw a line series chart, but as soon as I try to add the ChartPanAndZoom behavior I get a NoClassDefFoundError.  In the Activity, I am able to import the DeferredZoomPresenter class, but when trying to create the behavior it is unable to find it in the ChartPanAndZoomBehavior class.  Any Ideas?

I am using Mac OS X Yosemite (10.10.5), Android Studio v1.3.2 and Telerik library 2015.2.721. I have done a gradle sync, gradle clean, clean project, rebuild project and reimported the Telerik library.  Still the same every time.  Any ideas?  

 

Stack Trace:

09-18 12:07:19.519  29323-29323/com.mayoclinic.patient E/dalvikvm﹕ Could not find class 'com.telerik.android.primitives.widget.tooltip.contracts.DrawListener', referenced from method com.telerik.widget.chart.visualization.common.RadChartViewBase.onDraw
09-18 12:07:19.704  29323-29323/com.mayoclinic.patient E/ViewRootImpl﹕ sendUserActionEvent() mView == null
09-18 12:07:24.454  29323-29323/com.mayoclinic.patient E/dalvikvm﹕ Could not find class 'com.telerik.widget.chart.visualization.behaviors.views.DeferredZoomPresenter', referenced from method com.telerik.widget.chart.visualization.behaviors.ChartPanAndZoomBehavior.<init>
09-18 12:07:24.459  29323-29323/com.mayoclinic.patient E/AndroidRuntime﹕ FATAL EXCEPTION: main
    java.lang.NoClassDefFoundError: com.telerik.widget.chart.visualization.behaviors.views.DeferredZoomPresenter
            at com.telerik.widget.chart.visualization.behaviors.ChartPanAndZoomBehavior.<init>(ChartPanAndZoomBehavior.java:28)
            at com.mayoclinic.activity.patient.ResultActivity.onCreate(ResultActivity.java:84)
            at android.app.Activity.performCreate(Activity.java:5372)
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1104)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2257)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2349)
            at android.app.ActivityThread.access$700(ActivityThread.java:159)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:176)
            at android.app.ActivityThread.main(ActivityThread.java:5419)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:525)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862)
            at dalvik.system.NativeStart.main(Native Method)

 

6 Answers, 1 is accepted

Sort by
0
Mike
Top achievements
Rank 1
answered on 19 Sep 2015, 06:37 PM
I am having the same problem with Android Studio 1.3.2 on Windows.  Cleaned, Rebuilt, Reimported, same issue.
0
Victor
Telerik team
answered on 23 Sep 2015, 08:28 AM
Hi Mike,

Did you try to manually delete the build folder before building your project? Also, please try running "./gradlew clean build" through the command line. This command must be run when you are in the root folder of your project.

Regards,
Victor
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Dylan
Top achievements
Rank 1
answered on 14 Dec 2015, 06:26 PM

I have cleaned my project and rebuilt it, and I am still getting this error.

 

The Line chart works fine until add the ChartPanAndZoom behavior.

 

Any ideas why this is happening?

 

I have Chart, and Common .AAR as dependencies.

0
Matt
Top achievements
Rank 1
answered on 14 Dec 2015, 06:32 PM
I am in the same situation - the suggestions did not resolve my issue as well.
0
Accepted
Dylan
Top achievements
Rank 1
answered on 14 Dec 2015, 08:59 PM

Hey Matt, I fixed the problem, at least for myself.

 

 I am not sure how you are adding the .AAR's as a dependency.

 But I do it by right clicking my project > New Module > Import Jar/.AAR Package.

Then adding it to compile in my gradle file.

 

I only added Chart and Commons. You also have to add Primitives. This should fix the problem for you.

0
Matt
Top achievements
Rank 1
answered on 15 Dec 2015, 03:26 PM
Adding Primitives did the trick for me as well.  Thanks!
Tags
Chart
Asked by
Matt
Top achievements
Rank 1
Answers by
Mike
Top achievements
Rank 1
Victor
Telerik team
Dylan
Top achievements
Rank 1
Matt
Top achievements
Rank 1
Share this question
or