java.lang.NoClassDefFoundError: com.nineoldandroids.view.ViewHelper
Asked Answered
H

4

7

I am using daimajia/AndroidImageSlider. I imported all dependencies like NineOldAndroid,Picasso and this 'com.daimajia.slider:library:1.1.2@aar' and coded as guided on Github. but whenever i tried to run the app it stops and show the error.my biuld.gradle for app is.Thank you so much. spent two days already.

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:22.1.0'
compile 'com.squareup.picasso:picasso:2.3.2'
compile 'com.daimajia.slider:library:1.1.2@aar'
compile 'com.android.support:recyclerview-v7:21.0.+'
compile files('C:/Users/Vinit/Downloads/Coupan/library/volley.jar')
compile files('C:/Users/Vinit/Downloads/Coupan/library/nineoldandroids-2.3.0.jar')}

Don't know where and what i am doing wrong. this is my log file.

java.lang.NoClassDefFoundError: com.nineoldandroids.view.ViewHelper
        at com.daimajia.slider.library.Transformers.BaseTransformer.onPreTransform(BaseTransformer.java:75)
        at com.daimajia.slider.library.Transformers.BaseTransformer.transformPage(BaseTransformer.java:42)
        at com.daimajia.slider.library.Tricks.ViewPagerEx.onPageScrolled(ViewPagerEx.java:1727)
        at com.daimajia.slider.library.Tricks.ViewPagerEx.pageScrolled(ViewPagerEx.java:1649)
        at com.daimajia.slider.library.Tricks.ViewPagerEx.scrollToItem(ViewPagerEx.java:581)
        at com.daimajia.slider.library.Tricks.ViewPagerEx.onLayout(ViewPagerEx.java:1599)
        at android.view.View.layout(View.java:15131)
        at android.view.ViewGroup.layout(ViewGroup.java:4862)
        at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1160)
        at android.view.View.layout(View.java:15131)
        at android.view.ViewGroup.layout(ViewGroup.java:4862)
        at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1160)
        at android.view.View.layout(View.java:15131)
        at android.view.ViewGroup.layout(ViewGroup.java:4862)
        at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1160)
        at android.view.View.layout(View.java:15131)
        at android.view.ViewGroup.layout(ViewGroup.java:4862)
        at android.widget.FrameLayout.layoutChildren(FrameLayout.java:515)
        at android.widget.FrameLayout.onLayout(FrameLayout.java:450)
        at android.view.View.layout(View.java:15131)
        at android.view.ViewGroup.layout(ViewGroup.java:4862)
        at android.support.v7.internal.widget.ActionBarOverlayLayout.onLayout(ActionBarOverlayLayout.java:493)
        at android.view.View.layout(View.java:15131)
        at android.view.ViewGroup.layout(ViewGroup.java:4862)
        at android.widget.FrameLayout.layoutChildren(FrameLayout.java:515)
        at android.widget.FrameLayout.onLayout(FrameLayout.java:450)
        at android.view.View.layout(View.java:15131)
        at android.view.ViewGroup.layout(ViewGroup.java:4862)
        at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1888)
        at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1742)
        at android.widget.LinearLayout.onLayout(LinearLayout.java:1651)
        at android.view.View.layout(View.java:15131)
        at android.view.ViewGroup.layout(ViewGroup.java:4862)
        at android.widget.FrameLayout.layoutChildren(FrameLayout.java:515)
        at android.widget.FrameLayout.onLayout(FrameLayout.java:450)
        at android.view.View.layout(View.java:15131)
        at android.view.ViewGroup.layout(ViewGroup.java:4862)
        at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2323)
        at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2029)
        at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1192)
        at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6231)
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:788)
        at android.view.Choreographer.doCallbacks(Choreographer.java:591)
        at android.view.Choreographer.doFrame(Choreographer.java:560)
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:774)
        at android.os.Handler.handleCallback(Handler.java:808)
        at android.os.Handler.dispatchMessage(Handler.java:103)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:5292)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:515)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:824)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640)
        at dalvik.system.NativeStart.main(Native Method)
Hellebore answered 27/4, 2015 at 10:38 Comment(0)
H
27

Finally, after two days I found the solution. I just added:

implementation 'com.nineoldandroids:library:2.4.0'

Hellebore answered 27/4, 2015 at 11:29 Comment(2)
Lol 3 minutes before your answer you got the same one from sajal :3Lamothe
ILY you saved my time constraintApure
D
1

Move all your libraries in lib folder under your app folder in android studio and then add its path in build.gradle dependencies.

for ex-

compile files('lib/volley.jar')
Dennison answered 27/4, 2015 at 10:57 Comment(1)
use this - compile 'com.nineoldandroids:library:2.4.0' insted of adding .jar file. Hope this worksDennison
I
1

NineOldAndroids is deprecated. No new development will be taking place. Existing versions will (of course) continue to function. New applications should use minSdkVersion="14" or higher which has access to the platform animation APIs.

Inspired answered 25/12, 2020 at 6:41 Comment(0)
L
0

Check the libs folder if they are present

Check with right click properties under android if your libs are added properly when it's an external lib or under build path if it is present

GL

Lamothe answered 27/4, 2015 at 10:43 Comment(2)
I have nineoldandroid.jar in library and picasso and and daimajia in external libraries folder. i am using android studio.Hellebore
Okay I just know how it's handled in eclipse sryLamothe

© 2022 - 2024 — McMap. All rights reserved.