{"id":420758,"date":"2021-04-01T06:58:12","date_gmt":"2021-03-31T22:58:12","guid":{"rendered":"http:\/\/4563.org\/?p=420758"},"modified":"2021-04-01T06:58:12","modified_gmt":"2021-03-31T22:58:12","slug":"%e8%af%b7%e6%95%99%e4%b8%80%e4%b8%aa-android-glide-%e4%bd%bf%e7%94%a8%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=420758","title":{"rendered":"\u8bf7\u6559\u4e00\u4e2a Android glide \u4f7f\u7528\u95ee\u9898"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u8bf7\u6559\u4e00\u4e2a Android glide \u4f7f\u7528\u95ee\u9898               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : hehezhang <\/span>  <span><i><\/i> 0<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u6211\u8981\u7528 glide \u53bb\u7f51\u4e0a\u53bb\u52a0\u8f7d\u4e00\u4e2a\u56fe\u7247<\/p>\n<pre><code>ImageView iv = findViewById(R.id.iv); Glide.with(this).load(url).into(iv); <\/code><\/pre>\n<p>url \u662f ip \u52a0\u7aef\u53e3\u7684\u5f62\u5f0f \u7ed3\u679c\u62a5\u9519\u4e86<\/p>\n<pre><code>class com.bumptech.glide.load.engine.GlideException: Failed to load resource Cause (1 of 1): class com.bumptech.glide.load.engine.GlideException: Fetching data failed, class java.io.InputStream, REMOTE Cause (1 of 1): class com.bumptech.glide.load.engine.GlideException: Fetch failed Cause (1 of 1): class java.io.IOException: Cleartext HTTP traffic to **.***.***.*** not permitted <\/code><\/pre>\n<p>\u4e4b\u540e \u6211\u4f7f\u7528\u57df\u540d\u8bbf\u95ee\u5c31\u53ef\u4ee5\u6b63\u5e38\u8bbf\u95ee \u8fd9\u662f\u6709\u4ec0\u4e48\u9650\u5236\u5417<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>5<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"5610780\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : hstan <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             &#8220;Cleartext HTTP traffic to **.***.***.*** not permitted&#8221;<br \/>\u770b\u8d77\u6765\u662f android P \u7684\u7f51\u7edc\u9650\u5236\u5427<br \/>\u8bd5\u8bd5\u5728 xml \u4e0b\u7684 network-security-config \u91cc\u589e\u52a0\u4f60\u4eec\u7684 ip \u914d\u7f6e                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5610781\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : kingiis <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8bd5\u9519\u6cd5<br \/>\u5148\u52a0\u8f7d\u4e00\u4e2a\u672c\u5730\u56fe\u7247<br \/>\u7136\u540e\u52a0\u8f7d\u4e00\u4e2a http \u56fe\u7247<br \/>\u7136\u540e\u52a0\u8f7d\u4e00\u4e2a https \u56fe\u7247<br \/>\u7136\u540e\u52a0\u8f7d\u4e00\u4e2a\u5e26\u7aef\u53e3\u56fe\u7247                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5610782\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : hmhm7442 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u53c2\u8003 1 \uff0c\u9ad8\u7248\u672c android \u7981\u6b62 http \u660e\u6587                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5610783\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : iture <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u518d\u8bf4\u4e00\u4e2a\u65b9\u6cd5\uff0c\u662f\u5728 AndroidManifest \u6587\u4ef6\u4e2d\u7684 &lt;application&gt; \u8282\u70b9\u4e2d\u589e\u52a0\u4e00\u4e2a useHTTPClearText (\u597d\u50cf\u662f\u8fd9\u4e2a\u540d\u5b57\uff09\u914d\u7f6e\uff0c\u5e76\u8bbe\u7f6e\u4e3a true \u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5610784\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ZoteTheMighty <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             Cleartext HTTP traffic. \u5f88\u660e\u663e\u4e86\uff0c \u4e0d\u80fd\u4f7f\u7528\u660e\u6587\u4f20\u8f93\uff0c\u9700\u8981\u9002\u914d\u4e0b\u9ad8\u7248\u672c\u7684 Android \u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u8bf7\u6559\u4e00\u4e2a Android glid&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/420758"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=420758"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/420758\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=420758"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=420758"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=420758"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}