开发者社区> 问答> 正文

android studio 下调用 oss jar包 出现NoClassDefFoundError

错误信息如下:
FATAL EXCEPTION: main

                                                                  Process: com.running.guoyeapp, PID: 16407
                                                                  java.lang.NoClassDefFoundError: Failed resolution of: Lcom/alibaba/sdk/android/oss/common/auth/OSSPlainTextAKSKCredentialProvider;
                                                                      at com.running.guoyeapp.ProfileActivity.onCreate(ProfileActivity.java:193)
                                                                      at android.app.Activity.performCreate(Activity.java:5977)
                                                                      at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1111)
                                                                      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2415)
                                                                      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2524)
                                                                      at android.app.ActivityThread.access$800(ActivityThread.java:167)
                                                                      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1419)
                                                                      at android.os.Handler.dispatchMessage(Handler.java:111)
                                                                      at android.os.Looper.loop(Looper.java:194)
                                                                      at android.app.ActivityThread.main(ActivityThread.java:5546)
                                                                      at java.lang.reflect.Method.invoke(Native Method)
                                                                      at java.lang.reflect.Method.invoke(Method.java:372)
                                                                      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:964)
                                                                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:759)
                                                                   Caused by: java.lang.ClassNotFoundException: Didn't find class "com.alibaba.sdk.android.oss.common.auth.OSSPlainTextAKSKCredentialProvider" on path: DexPathList[[dex file "/data/data/com.running.guoyeapp/files/instant-run/dex/slice-support-annotations-23.2.0_28b452f0dcf63117bdd32222664033ca36d5d456-classes.dex", dex file "/data/data/com.running.guoyeapp/files/instant-run/dex/slice-slice_9-classes.dex", dex file "/data/data/com.running.guoyeapp/files/instant-run/dex/slice-slice_8-classes.dex", dex file "/data/data/com.running.guoyeapp/files/instant-run/dex/slice-slice_7-classes.dex", dex file "/data/data/com.running.guoyeapp/files/instant-run/dex/slice-slice_6-classes.dex", dex file "/data/data/com.running.guoyeapp/files/instant-run/dex/slice-slice_5-classes.dex", dex file "/data/data/com.running.guoyeapp/files/instant-run/dex/slice-slice_4-classes.dex", dex file "/data/data/com.running.guoyeapp/files/instant-run/dex/slice-slice_3-classes.dex", dex file "/data/data/com.running.guoyeapp/files/instant-run/dex/slice-slice_2-classes.dex", dex file "/data/data/com.running.guoyeapp/files/instant-run/dex/slice-slice_1-classes.dex", dex file "/data/data/com.running.guoyeapp/files/instant-run/dex/slice-slice_0-classes.dex", dex file "/data/data/com.running.guoyeapp/files/instant-run/dex/slice-library-2.4.0_4afb87260132a2c19a3238085b36f51d25cd68a3-classes.dex", dex file "/data/data/com.running.guoyeapp/files/instant-run/dex/slice-internal_impl-23.2.0_aa6e88d2a6ed907066cd9f6275b971a2322367e5-classes.dex", dex file "/data/data/com.running.guoyeapp/files/instant-run/dex/slice-intermediates-exploded-aar-SMSSDKGUI-2.0.2_65c09793d28b461484ca57c37af04292cfdebb20-classes.dex", dex file "/data/data/com.running.guoyeapp/files/instant-run/dex/slice-intermediates-exploded-aar-SMSSDK-2.0.2_f662aca4b59ec53c2d86ac754cce358e0870e788-classes.dex", dex file "/data/data/com.running.guoyeapp/files/instant-run/dex/slice-httpmime-4.3.6_c5d93cd4aa30726d207f4011eda29b304336da47-classes.dex", dex file "/data/data/com.running.guoyeapp/files/instant-run/dex/slice-httpcore-4.3.3_25980c83148327e6ee7c31b42bd14ada0f9b0b86-classes.dex", dex file "/data/data/com.running.guoyeapp/files/instant-run/dex/slice-httpclient-4.3.6_4c1e0e2c4d608ab71cc1b4d771e39bc49185a49e-classes.dex", dex file "/data/data/com.running.guoyeapp/files/instant-run/dex/slice-com.android.support-support-vector-drawable-23.2.0_841bad4fc6fa0908cb818d8e354885d0cfd5deaa-classes.dex", dex file "/data/data/com.running.guoyeapp/files/instant-run/dex/slice-com.android.support-support-v4-23.2.0_5780a1632d0890586eb7a8816183d93a66437342-classes.dex", dex file "/data/data/com.running.guoyeapp/files/instant-run/dex/slice-com.android.support-appcompat-v7-23.2.0_3cd7ed92a875ac2c21f679dd4025814e9bd6c9de-classes.dex", dex file "/data/data/com.running.guoyeapp/files/instant-run/dex/slice-com.android.support-animated-vector-drawable-23.2.0_21fffd125b59d9bf95ac4c29cab0f9d96536

三个jar已经拷进libs目录

展开
收起
菜菜111 2016-05-03 17:06:44 5841 0
1 条回答
写回答
取消 提交回答
问答排行榜
最热
最新

相关电子书

更多
58同城Android客户端Walle框架演进与实践之路 立即下载
Android组件化实现 立即下载
蚂蚁聚宝Android秒级编译——Freeline 立即下载