- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我无法在 Android 9.0 Pie 中使用 Picasso 库加载图像。实际上,它适用于以下版本。它没有显示任何错误消息。有人使用
在 Github 上分享了他的日志Picasso.get().setLoggingEnabled(true);
他有消息日志:
2018-10-19 13:13:20.467 24840-24862/com.xyz.test.testpicasso D/ViewContentFactory: initViewContentFetcherClass
2018-10-19 13:13:20.467 24840-24862/com.xyz.test.testpicasso I/ContentCatcher: ViewContentFetcher : ViewContentFetcher
2018-10-19 13:13:20.467 24840-24862/com.xyz.test.testpicasso D/ViewContentFactory: createInterceptor took 0ms
2018-10-19 13:13:20.468 24840-24862/com.xyz.test.testpicasso I/ContentCatcher: Interceptor : Catcher list invalid for com.xyz.test.testpicasso@com.xyz.test.testpicasso.MainActivity@147874166
2018-10-19 13:13:20.468 24840-24862/com.xyz.test.testpicasso I/ContentCatcher: Interceptor : Get featureInfo from config pick_mode
2018-10-19 13:13:20.485 24840-24840/com.xyz.test.testpicasso D/Picasso: Main created [R1] Request{https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png}
2018-10-19 13:13:20.492 24840-24864/com.xyz.test.testpicasso D/Picasso: Dispatcher enqueued [R1]+6ms
2018-10-19 13:13:20.492 24840-24866/com.xyz.test.testpicasso D/Picasso: Hunter executing [R1]+7ms
2018-10-19 13:13:20.555 1531-1684/? I/ActivityManager: Displayed com.xyz.test.testpicasso/.MainActivity: +114ms
2018-10-19 13:13:20.555 5475-5603/? D/PowerKeeper.Event: notifyActivityLaunchTime: com.xyz.test.testpicasso/.MainActivity totalTime: 114
2018-10-19 13:13:20.709 735-816/? W/SurfaceFlinger: Attempting to set client state on removed layer: Splash Screen com.xyz.test.testpicasso#0
2018-10-19 13:13:20.710 735-816/? W/SurfaceFlinger: Attempting to destroy on removed layer: Splash Screen com.xyz.test.testpicasso#0
2018-10-19 13:13:20.775 1531-1684/? I/Timeline: Timeline: Activity_windows_visible id: ActivityRecord{821c51 u0 com.xyz.test.testpicasso/.MainActivity t4372} time:9356677
2018-10-19 13:13:21.003 24840-24864/com.xyz.test.testpicasso D/Picasso: Dispatcher retrying [R1]+518ms
2018-10-19 13:13:21.004 24840-24872/com.xyz.test.testpicasso D/Picasso: Hunter executing [R1]+519ms
2018-10-19 13:13:21.513 24840-24864/com.xyz.test.testpicasso D/Picasso: Dispatcher retrying [R1]+1027ms
2018-10-19 13:13:21.514 24840-24877/com.xyz.test.testpicasso D/Picasso: Hunter executing [R1]+1028ms
2018-10-19 13:13:21.516 24840-24864/com.xyz.test.testpicasso D/Picasso: Dispatcher batched [R1]+1030ms for error
2018-10-19 13:13:21.717 24840-24864/com.xyz.test.testpicasso D/Picasso: Dispatcher delivered [R1]+1232ms
最佳答案
尝试在 list 文件的应用程序标签中使用 android:usesCleartextTraffic="true"
!因为我在使用 Android Volley 时遇到了同样的问题!
根据 Android 文档
Indicates whether the app intends to use cleartext network traffic, such as cleartext HTTP. The default value for apps that target API level 27 or lower is
"true"
. Apps that target API level 28 or higher default to"false"
.When the attribute is set to
"false"
, platform components (for example, HTTP and FTP stacks, DownloadManager, MediaPlayer) will refuse the app's requests to use cleartext traffic. Third-party libraries are strongly encouraged to honor this setting as well. The key reason for avoiding cleartext traffic is the lack of confidentiality, authenticity, and protections against tampering: a network attacker can eavesdrop on transmitted data and also modify it without being detected. link
关于java - Android 9.0 Pie 的 Picasso 图像加载问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53139689/
Picasso.with(context).load("url").into(imageView); 在这里,我想要位图而不是 url,我该如何实现这一点。 像下面- Picasso.with(con
我在运行低于 API 版本 21 的手机上遇到 noClassDefFoundError。首先它与其他类一起出现,在删除所有可能的代码后,它开始与 Picasso 库一起出现。我附上了我的 logca
在 Picasso.with(context) .. public static Picasso with(Context context) { if (singleton == null) {
我第一次尝试使用Picasso 如官方网站示例: private void setItemBgImageUsingPicasso(View convertView) { String imag
我添加了 picasso 依赖项,但似乎没有用。我尝试更改版本。但还是没用。 这是我的 build.gradle(模块) apply plugin: 'com.android.application'
我想用 com.squareup.picasso:picasso:2.5.3-SNAPSHOT 编译。但是我得到了这个错误: Error:Could not find com.squareup.pic
我只在 Lollipop 版本上遇到过这个问题。我可以在 Lollipop 以上的版本上轻松运行该应用程序。当我在我的应用程序文件中运行该应用程序时出现错误: java.lang.NoClass
它在 Gradle build 和 Compile time 都没有给出任何错误消息,但是当我运行应用程序时它崩溃并给我以下错误消息。 Caused by: java.lang.ClassNotFou
在 android studio 中,Gradle 项目无法同步并导致此错误。 Error:(29, 13) Failed to resolve: com.squareup.picasso:picas
首先我知道这个错误是asked已经,但我的情况有点不同: 我正在分发 SDK(Android 库项目)。我的 SDK 需要其他东西(播放服务、支持 v4、gson jar 等)Picasso,所以我在
我认为这是一个库兼容性问题,但值得一试。 我正在尝试在我的应用程序中实现图像 slider ,但 Picasso 库出现了异常,它给了我 noSuchMethodError。 好吧,我连接两个字符串,
我对此非常绝望。问题是 picasso 只显示占位符图标。 我的 FirebaseStorageRefernce 代码看起来像这样引用 Firebase Blog post : StorageRef
我们正在使用Picasso加载应用程序中的所有图像,从小型化身到大型全屏图像,每10个每日事件用户中就会出现1个此类错误。 picasso 缓存已满,但据我们了解,它应该自行维护。 我们的日志表明,在
在我的函数中: public void getPointMarkerFromUrl(final String url, final OnBitmapDescriptorRetrievedListene
我正在尝试使用 Picasso 库加载矢量绘图 Picasso.get().load(R.drawable.project).into(image3a, new Callback() {
出于某种原因,每当我尝试将从 GET 请求获取的 URL 加载到服务器时,它都不会加载,但如果我尝试直接加载字符串,它就会工作。这是我的代码: new Thread(new Runnable() {
我在使用 picasso 库时遇到问题。当我使用此库(implementation 'com.squareup.picasso:picasso:2.71828')时,我的图像不会显示在 ImageVi
我使用 Picasso 库从 URL 加载图像。我想获得真实的图像大小,但我只能获得内存中的图像大小: Picasso.with(this) .load(imageUrl) .erro
我正在尝试在我的 gradle-android 项目中使用 Picasso 库。我正在使用 Eclipse IDE。当我对我的项目进行 gradle 构建时,构建正确,但在使用 Picasso 的 *
我遇到了一个问题,即在不同版本的 Android(KitKat 和 Marshmellow)上的某些设备(非 Nexus 设备)上,当我尝试使用 picasso 将图像加载到 ImageView 中时
我是一名优秀的程序员,十分优秀!