[SOLVED] UnityWebRequest Unknown Error - Android 9(API 레벨 28+)
Unity3D/Problems 2019. 2. 20. 14:17안드로이드 API 9에서 webrequest http post 통신시 에러발생 (unknown error)
https://forum.unity.com/threads/android-9-cleartext-http-traffic-to-my_ip-not
https://developer.android.com/guide/topics/manifest/application-element
Android OS 9 Pie 버전부터는 WebView에 일반적인 텍스트로 "http://" URL 접근이 막혔음.
(tagetSdkVersion 28 이상일 경우)
참고 : https://developer.android.com/training/articles/security-config#CleartextTrafficPermitted
[해결방법]
https://stackoverflow.com/questions/45940861/android-8-cleartext-http-traffic-not-permitted
방법1. AndroidManifest.xml 에서 application 의 usesClearTextTraffic 속성 수정
<?xml version="1.0" encoding="utf-8"?>
<manifest ...>
...
<application
...
android:usesCleartextTraffic="true"
https://nobase-dev.tistory.com/category/Android%EA%B0%9C%EB%B0%9C/Tips
<?xml version="1.0" encoding="utf-8"?><!-- This file was automatically generated by the Google Play Games plugin for UnityDo not edit. --><manifest xmlns:android="http://schemas.android.com/apk/res/android"package="com.google.example.games.mainlibproj"android:versionCode="1"android:versionName="1.0" ><uses-sdk android:minSdkVersion="14" /><application android:usesCleartextTraffic="true"><!-- The space in these forces it to be interpreted as a string vs. int --><meta-data android:name="com.google.android.gms.games.APP_ID"android:value="\u003319835351291" /><!-- Keep track of which plugin is being used --><meta-data android:name="com.google.android.gms.games.unityVersion"android:value="\u0030.9.57" /><activity android:name="com.google.games.bridge.NativeBridgeActivity"android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" /></application></manifest>
'Unity3D > Problems' 카테고리의 다른 글
Unity XR 플랫폼 업데이트 (0) | 2020.06.04 |
---|---|
unity create script compile error (0) | 2019.12.10 |
[SOLVED] EnableSavedGames ERROR_NOT_AUTHORIZED (0) | 2019.02.01 |
Gradle Build Failed (1) | 2018.12.06 |
Spine Sprite Attacher (0) | 2018.11.06 |