问题
Following on from this question where I had a real issue with AppLinks. The problem was eventually narrowed down to the fact that the build process was dragging the host from the network_security_config.xml
into the merged manfest file section specifying the AppLinks. This unexpected host that I used for testing wasn't hosting an assetlinks.json
specifying the correct signatures.
Details of the answer can be found here.
So, why does the build process turn this
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:host="letsdraw.fun" android:pathPrefix="/ec" android:scheme="https" />
<data android:host="letsdraw.fun" android:pathPrefix="/restore" android:scheme="https" />
</intent-filter>
Into this?
<intent-filter
android:autoVerify="true">
<action
android:name="android.intent.action.VIEW" />
<category
android:name="android.intent.category.DEFAULT" />
<category
android:name="android.intent.category.BROWSABLE" />
<data
android:scheme="http"
android:host="scribble-cloud-v24-test-dot-scribble-cloud.appspot.com"
android:pathPrefix="/ec" />
<data
android:scheme="https"
android:host="scribble-cloud.appspot.com"
android:pathPrefix="/ec" />
<data
android:scheme="https"
android:host="letsdraw.fun"
android:pathPrefix="/ec" />
<data
android:scheme="https"
android:host="letsdraw.fun"
android:pathPrefix="/restore" />
</intent-filter>
来源:https://stackoverflow.com/questions/65215382/why-does-the-host-specified-in-network-security-config-xml-get-merged-into-the-a