Process: com.huiyi.nypos.pay, PID: 21364
java.lang.NoSuchMethodError: No static method canonicalize(Ljava/lang/String;Ljava/lang/String;ZZZZ)Ljava/lang/String;
in class Lokhttp3/HttpUrl; or its super classes (declaration of 'okhttp3.HttpUrl' appears in /data/app/com.huiyi.nypos.pay-2/split_lib_dependencies_apk.apk)
at okhttp3.FormBody$Builder.add(FormBody.java:109)
at com.pftlibrary.SpalishActivity.d(Unknown Source)
at com.pftlibrary.SpalishActivity.onCreate(Unknown Source)
at android.app.Activity.performCreate(Activity.java:6033)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2280)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2389)
at android.app.ActivityThread.access$800(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1305)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5268)
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:902)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:697)
当调用第三方arr包的时候,需要加载okhttp3包,加载后,运行包这个错误,找到报错误处,应该是包冲突了,然后在libraries里,有另外一个aar包里面是打包了okhttp3包,于是让aar包提供方,提供一个不到宝okhttp3包的aar,运行OK了!希望对大家有帮助...