![](/img/trans.png)
[英]New Google play console - managed publishing for first app release issue for multiple release at a time
[英]Facing issue while publishing Instant App on Google Play Console
從 Google Play 控制台發布即時應用程序時,我遇到了以下問題。
之前發布了相同的應用程序,沒有任何錯誤。 請檢查 Instant 應用的清單內容。 為隱私屏蔽的域。
默認 URL 也在 Instant 和主應用程序中設置。 僅供參考, Instant 和 main 的源代碼是不同的。
<activity
android:name=".InstantPaymentHome"
android:windowSoftInputMode="adjustResize"
android:configChanges="locale"
android:exported="true">
<meta-data
android:name="default-url"
android:value="https://www.mydomain.com.sa" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<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="https"
android:host="mydomain.com.sa"
android:pathPattern="/pay" />
</intent-filter>
<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="https"
android:host="www.mydomain.com.sa"
android:pathPattern="/pay" />
</intent-filter>
<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="mydomain.com.sa"
android:pathPattern="/pay" />
</intent-filter>
<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="www.mydomain.com.sa"
android:pathPattern="/pay" />
</intent-filter>
</activity>
所以我遇到了同樣的問題,經過反復試驗,我設法通過了它
我的設置與 OP 非常相似
我認為,問題在於<meta-data android:name="default-url" android:value="https://www.mydomain.com.sa" />
中定義的 URL 與該 URL 不完全匹配在<intent-filter>
中定義,因為<intent-filter>
有android:pathPattern="/pay"
所以意圖過濾器定義的 URL 是 "https://www.mydomain.com.sa/pay" 但是default-url
是“https://www.mydomain.com.sa”,沒有/pay
所以對我有用的解決方案是將default-url
更改為此
<activity ...>
<meta-data
android:name="default-url"
android:value="https://www.mydomain.com.sa/pay" />
....
</activity>
我找到了一個更清潔的解決方案。 只需將/.*
添加到pathPattern
中,如下所示。 default-url
的 rest 等保持不變。
<data
android:scheme="https"
android:host="www.example.com.sa"
android:pathPattern="/pay/.*" />
這解決了我面臨的問題。 添加通配符/.*
將匹配任何具有如下模式的 URL
http://www.example.com/pay/en?amount=67&number=06737364646
http://www.example.com/pay/ar?amount=67
http://www.example.com/pay?amount=67
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.