我有一个应用程序使用
clearText
在Android客户端和服务器之间使用
Retrofit
,和
Android 9+
不允许使用
明文
.
忽略我添加的
android:usesCleartextTraffic="true"
在里面
Manifest
但它警告说:
tools:ignore="GoogleAppIndexingWarning"
并建议添加
tools:targetApi="m"
.
有点困惑:
我的清单:
...
<application
android:name=".ApplicationClass"
android:allowBackup="true"
android:fullBackupContent="false"
android:hardwareAccelerated="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="false"
android:theme="@style/AppTheme.NoActionBar"
android:usesCleartextTraffic="true"
tools:ignore="GoogleAppIndexingWarning"
tools:targetApi="m">
...