关于okhttp(java.lang.NoSuchMethodError: No interface method rangeEquals(JLokio/ByteString;)Z)错误
来源:互联网 发布:扫码抵扣软件 编辑:程序博客网 时间:2024/05/03 11:02
错误信息:
E/AndroidRuntime: FATAL EXCEPTION: Thread-2322 Process: cn.vove7.sendjsondemo, PID: 18952 Theme: themes:{com.cyanogenmod.trebuchet=overlay:system, com.tencent.mobileqq=overlay:org.cyanogenmod.hexolibre, com.android.settings=overlay:system} java.lang.NoSuchMethodError: No interface method rangeEquals(JLokio/ByteString;)Z in class Lokio/BufferedSource; or its super classes (declaration of 'okio.BufferedSource' appears in /data/app/cn.vove7.sendjsondemo-1/split_lib_dependencies_apk.apk:classes15.dex) at okhttp3.internal.Util.bomAwareCharset(Util.java:412) at okhttp3.ResponseBody.string(ResponseBody.java:173) at cn.vove7.sendjsondemo.MainActivity.post(MainActivity.java:84) at cn.vove7.sendjsondemo.MainActivity.access$000(MainActivity.java:18) at cn.vove7.sendjsondemo.MainActivity$1$1.run(MainActivity.java:49) at java.lang.Thread.run(Thread.java:818)
由于使用的引用外部jar包,就一直出错,
将
compile files('src/main/res/lib/okhttp-3.6.0.jar') compile files('src/main/res/lib/okio-1.6.0.jar')
换为maven依赖即可
compile 'com.squareup.okhttp3:okhttp:3.6.0'
阅读全文
0 0
- 关于okhttp(java.lang.NoSuchMethodError: No interface method rangeEquals(JLokio/ByteString;)Z)错误
- 运行错误:java.lang.NoSuchMethodError: No static method setOnApplyWindowInsetsListener
- Android错误解决:java.lang.NoSuchMethodError: No static method encodeBase64String
- 错误 java.lang.NoSuchMethodError: No static method getFont
- java.lang.NoSuchMethodError: No static method hasOnClickListeners(Landroid/view/View;)Z in class Lan
- Retrofit---java.lang.NoSuchMethodError: No virtual method isSuccess()Z in class Lretrofit2/Response
- Caused by: java.lang.NoSuchMethodError:No virtual method isSuccess()Z in class Lretrofit2/Response;
- java.lang.NoSuchMethodError: No virtual method getContext()
- java.lang.NoSuchMethodError: No static method getFont
- 关于Recyclerview使用时的一个错误java.lang.NoSuchMethodError: No static method getMatrix(Landroid/view/View;)
- 关于Recyclerview使用时的一个错误java.lang.NoSuchMethodError: No static method getMatrix(Landroid/view/View;)
- java.lang.NoSuchMethodError: no static or non-static method 解决方法
- Retrofit-java.lang.NoSuchMethodError: No virtual method log
- java.lang.NoSuchMethodError: org.apache.log4j.Logger.isTraceEnabled()Z错误
- Hibernate 错误 java.lang.NoSuchMethodError: javax.persistence.OneToOne.orphanRemoval()Z
- java.lang.NoSuchMethodError: javax.persistence.OneToMany.orphanRemoval()Z错误
- Okhttp关于 java.lang.NoSuchMethodError: okio.BufferedSource报错
- java.lang.NoSuchMethodError错误
- Android7.0中文文档(API)-- TextClock
- 编码规范与重构思路总结
- Git出现无法同步问题的解决方式
- LaTeX无图片编号
- 广度优先搜索和深度优先搜索
- 关于okhttp(java.lang.NoSuchMethodError: No interface method rangeEquals(JLokio/ByteString;)Z)错误
- Excel应用—使用VBA完成文本资料的结构化存储
- CSS之display与visibility
- MySQL索引的创建、删除和查看
- Java弱引用详解
- JVM——运行时数据区域
- MYSQL SELECT FOR UPDATE
- URL地址中含有点号导致参数解析错误的解决办法
- [BZOJ3242][NOI2013]快餐店-基环树-动态规划