0 votes

1 Answer

0 votes
by (6.6k points)
by (340 points)

首先感谢您的回复,我想问下为啥我上面那个地址在pico3里面访问不到是黑屏的

by (6.6k points)

跟设备关系不大,我看说是api28之后禁止使用明文网络,api27之前这个值都默认为true,api28之后都默认为false
修改一下安卓manifest,在application中添加android:usesCleartextTraffic="true"试试

<?xml version="1.0" encoding="utf-8"?>
<!-- GENERATED BY UNITY. REMOVE THIS COMMENT TO PREVENT OVERWRITING WHEN EXPORTING AGAIN-->
<manifest
    xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.unity3d.player"
    xmlns:tools="http://schemas.android.com/tools">
    <application android:usesCleartextTraffic="true">
        <activity android:name="com.unity3d.player.UnityPlayerActivity"
                  android:theme="@style/UnityThemeSelector">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
        </activity>
            <meta-data android:name="pico_advance_interface" android:value="0"/>
    </application>
</manifest>

enter image description here

...