java.lang.NoClassDefFoundError: com.nineoldandroids.view.ViewHelper
java.lang.NoClassDefFoundError: com.nineoldandroids.view.ViewHelper
我正在使用 daimajia/AndroidImageSlider。我导入了所有依赖项,如 NineOldAndroid、Picasso 和这个 'com.daimajia.slider:library:1.1.2@aar',并按照 Github 上的指导进行了编码。但每当我尝试 运行 应用程序时,它就会停止并显示应用程序 is.Thank 的 error.my biuld.gradle 你这么多。已经用了两天了。
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')}
不知道我在哪里做错了什么。这是我的日志文件。
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)
检查 libs 文件夹是否存在
检查 android 下的右键单击属性,如果您的库是外部库或在构建路径下(如果存在)是否已正确添加
GL
将所有库移动到 android studio 中应用文件夹下的 lib 文件夹中,然后将其路径添加到 build.gradle dependencies 中。
前任
compile files('lib/volley.jar')
终于在两天后找到了解决办法。我刚刚添加:
implementation 'com.nineoldandroids:library:2.4.0'
NineOldAndroids 已弃用。不会有新的发展。现有版本将(当然)继续运行。新应用程序应使用 minSdkVersion="14" 或更高版本,可以访问平台动画 API。
我正在使用 daimajia/AndroidImageSlider。我导入了所有依赖项,如 NineOldAndroid、Picasso 和这个 'com.daimajia.slider:library:1.1.2@aar',并按照 Github 上的指导进行了编码。但每当我尝试 运行 应用程序时,它就会停止并显示应用程序 is.Thank 的 error.my biuld.gradle 你这么多。已经用了两天了。
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')}
不知道我在哪里做错了什么。这是我的日志文件。
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)
检查 libs 文件夹是否存在
检查 android 下的右键单击属性,如果您的库是外部库或在构建路径下(如果存在)是否已正确添加
GL
将所有库移动到 android studio 中应用文件夹下的 lib 文件夹中,然后将其路径添加到 build.gradle dependencies 中。
前任
compile files('lib/volley.jar')
终于在两天后找到了解决办法。我刚刚添加:
implementation 'com.nineoldandroids:library:2.4.0'
NineOldAndroids 已弃用。不会有新的发展。现有版本将(当然)继续运行。新应用程序应使用 minSdkVersion="14" 或更高版本,可以访问平台动画 API。