当我调试我的应用程序时,它工作正常,但当我尝试导出我的apk并安装它时,我会遇到以下问题:

java.lang.NoClassDefFoundError: org.apache.http.params.SyncBasicHttpParams
at aig.a(Unknown Source)
at ahy.q(Unknown Source)
at ahy.d(Unknown Source)
at ahy.r(Unknown Source)
at ahy.c(Unknown Source)
at ahy.a(Unknown Source)
at ahy.a(Unknown Source)
at ahy.execute(Unknown Source)
at com.application.Login.a(Unknown Source)
at com.application.Login.onCreate(Unknown Source)
at android.app.Activity.performCreate(Activity.java:5115)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1083)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2162)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2248)
at android.app.ActivityThread.access$600(ActivityThread.java:145)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1246)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5095)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:898)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665)
at dalvik.system.NativeStart.main(Native Method)

我在用Proguard,
我还添加了如下引用lib:
-libraryjars /libs/org.apache.httpcomponents.httpclient_4.2.1.jar
-libraryjars /libs/signpost-commonshttp4-1.2.1.1.jar
-libraryjars /libs/signpost-core-1.2.1.1.jar
-libraryjars /libs/signpost-jetty6-1.2.1.1.jar
-libraryjars /libs/twitter4j-core-2.1.6.jar

你知道吗……@谢谢

最佳答案

你的libs中没有httpcore。
请导入HttpCore
这个链接是httpcore 4.1,你可以搜索httpcore4.2或4.3。
以后导入库时,请确保导入相关库

09-11 21:32