ERR_CLEARTEXT_NOT_PERMITTED 해결법
flutter에서 webview_flutter 라이브러리를 이용하여 웹뷰를 작성 시 ERR_CLEARTEXT_NOT_PERMITTED 에러가 발생함.
이는 https로 접속해야하만 제대로 웹페이지를 보여주는 기본 보안설정 때문. 다음 조치로 해결
안드로이드
AndroidManifest.xml 파일 수정하기.
android>app>src>main>AndroidManifest.xml 파일을 열기

application 단락에 다음 내용을 추가
android:usesCleartextTraffic="true"

iOS
ios>Runner>info.plist 파일을 열기

다음내용을 하단에 추가하기
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSAllowsArbitraryLoadsInWebContent</key>
<true/>
</dict>

0개의 댓글