안드로이드 스튜디오

킹드로이드 스튜디오 webView Https 문제해결방법

고줭 2020. 12. 31. 21:02

오늘은 webView로 인터넷 접속이 안될때 문제를 해결해보려합니다

 

1. res안에 xml 을 추가해주기

 

전 그림처럼 했습니다 Resource type도 XML 이름도 끝에 xml, Available qualifiers는 Network Code로!!

<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
    <domain-config cleartextTrafficPermitted="true">
        <domain includeSubdomains="true">secure.example.com</domain>
    </domain-config>
</network-security-config>

내용은 이거!
누구는 cleartextTrafficPermitted="false"해도 된다는데 해보니까 둘 다 됐습니다 ㅎㅎ

 

 

2. AndroidManifest.xml 열기

네모박스!

빨갛게 표시해놓은걸 쓰면 됩니당

 

이것은 단 두개의 동작만으로 실행시킬수있어 너무쉽죠? 안된다고 제게 따지지말아주세요 전 제가 성공한 방법을 공유하는겁니다..