![](/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.