NoClassDefFoundError DeferredZoomPresenter

7 posts, 1 answers
  1. Matt
    Matt avatar
    8 posts
    Member since:
    Aug 2015

    Posted 18 Sep 2015 Link to this post

    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)

     

  2. Mike
    Mike avatar
    1 posts
    Member since:
    Sep 2015

    Posted 19 Sep 2015 in reply to Matt Link to this post

    I am having the same problem with Android Studio 1.3.2 on Windows.  Cleaned, Rebuilt, Reimported, same issue.
  3. DevCraft banner
  4. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 23 Sep 2015 Link to this post

    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
  5. Dylan
    Dylan avatar
    2 posts
    Member since:
    Dec 2015

    Posted 14 Dec 2015 in reply to Victor Link to this post

    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.

  6. Matt
    Matt avatar
    8 posts
    Member since:
    Aug 2015

    Posted 14 Dec 2015 in reply to Dylan Link to this post

    I am in the same situation - the suggestions did not resolve my issue as well.
  7. Answer
    Dylan
    Dylan avatar
    2 posts
    Member since:
    Dec 2015

    Posted 14 Dec 2015 in reply to Matt Link to this post

    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.

  8. Matt
    Matt avatar
    8 posts
    Member since:
    Aug 2015

    Posted 15 Dec 2015 in reply to Dylan Link to this post

    Adding Primitives did the trick for me as well.  Thanks!
Back to Top
DevCraft banner