【发布时间】:2019-04-25 23:31:21
【问题描述】:
我正在尝试将我的 Android 应用上的 Picasso Library 从版本 2.5.2 升级到最新版本的 2.71828。
我正在使用其他相关库的以下版本。
implementation 'com.squareup.okhttp:okhttp-urlconnection:2.7.2'
implementation 'com.squareup:otto:1.3.8'
implementation 'com.squareup.retrofit:retrofit:1.9.0'
implementation 'com.google.code.gson:gson:2.6.1'
当我尝试启动时应用程序崩溃,并出现以下错误。
java.lang.NoSuchMethodError: No interface method readUtf8LineStrict(J)Ljava/lang/String; in class Lokio/BufferedSource; or its super classes (declaration of 'okio.BufferedSource' appears in /data/app/com.app.dev-64CjLuqx-zjNoiTFWtBRvA==/base.apk!classes2.dex)
请告诉我我做错了什么。
【问题讨论】:
-
向我展示你的整个 app 的 build.gradle 文件
-
这看起来更像是 okhttp 中缺少的类
-
用最新版本升级您的改造和 okhttp 版本。
-
在 picasso 库中,与以前的版本相比,升级到 2.71828 时有很多变化,我在最新版本中遇到了一些与(context)方法有关的问题