[android] java.io.ioexception: cleartext http traffic to not permitted 해결 방법

2019. 12. 18. 01:04·내맘대로/안드로이드

 

 

1.manifest에 추가

- <application android:networkSecurityConfig="@xml/network_security_config" ...>

- <manifest android:targetSandboxVersion="1" xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.dallygram">

- <uses-permission android:name="android.permission.INTERNET" />

 

2.res/xml/network_security_config.xml 파일 생성 후 코드 작성

 

<?xml version="1.0" encoding="utf-8"?>

<network-security-config>

<base-config cleartextTrafficPermitted="true">

<trust-anchors>

<certificates src="system" />

</trust-anchors>

</base-config>

</network-security-config>

 

 

 

 

 

참고 블로그

 

https://stackoverflow.com/questions/45940861/android-8-cleartext-http-traffic-not-permitted

 

Android 8: Cleartext HTTP traffic not permitted

I had reports from users with Android 8 that my app (that uses back-end feed) does not show content. After investigation I found following Exception happening on Android 8: 08-29 12:03:11.246 11285-

stackoverflow.com

https://developside.tistory.com/85

 

안드로이드 http 프로토콜 접속 시 예외발생 조치 (ERR CLEARTEXT NOT PERMITTED)

어제 앱을 개발 중 glide v4를 사용하여 웹에 있는 그림을 load 하였는데, 아래와 같은 예외를 주며 동작을 하지 않았습니다. com.bumptech.glide.load.engine.GlideException: Fetching data failed, class java...

developside.tistory.com

 

'내맘대로 > 안드로이드' 카테고리의 다른 글

[Android] Volley  (0) 2021.02.17
이미지 Uri -> String  (0) 2019.10.09
갤러리에서 여러 이미지 선택  (0) 2019.10.03
Acitivity로 이미지 Uri 받아오기  (0) 2019.10.03
갤러리에서 사진 가져오기 (Uri)  (0) 2019.10.03
'내맘대로/안드로이드' 카테고리의 다른 글
  • [Android] Volley
  • 이미지 Uri -> String
  • 갤러리에서 여러 이미지 선택
  • Acitivity로 이미지 Uri 받아오기
힙딩
힙딩
삽질은 나를 성장하게 해주는 경험치..
  • 힙딩
    삽질은 나의 경험치
    힙딩
  • 전체
    오늘
    어제
    • 분류 전체보기 (29)
      • 프론트엔드 (2)
        • React (0)
        • Javascript (0)
        • HTML&CSS (0)
      • 일기 (2)
        • 일기 (2)
      • 면접준비 (0)
      • 독서 (1)
      • 내맘대로 (23)
        • 웹 (3)
        • 안드로이드 (10)
        • 서버 (3)
        • 오류모음 (6)
        • 아두이노 (1)
  • 블로그 메뉴

    • 홈
    • 태그
    • 방명록
  • 링크

  • 공지사항

  • 인기 글

  • 태그

    putExtra
    php
    Do it
    HTML
    log
    자바스크립트
    로그
    데이터전달
    한입 fe 챌린지 2기
    javascript
    서평단
    인텐트
    한권으로 끝내는 웹 기본 교과서
    이지스퍼블리싱
    intent
    CSS
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.3
힙딩
[android] java.io.ioexception: cleartext http traffic to not permitted 해결 방법
상단으로

티스토리툴바