提示信息如下:
上傳失敗
您必須讓網路 intent-filter 同時使用 http 和 https 網址配置。
Android 資訊清單中的「android:autoVerify」屬性設為 true,但您的免安裝應用程式 APK 未宣告至少一個網路「intent-filter」元素。
提示信息如下:
上傳失敗
您必須讓網路 intent-filter 同時使用 http 和 https 網址配置。
Android 資訊清單中的「android:autoVerify」屬性設為 true,但您的免安裝應用程式 APK 未宣告至少一個網路「intent-filter」元素。
自己解决了。修改AndroidManifest.xml中的这段。
<intent-filter android:order="1">
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.BROWSABLE"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:host="${host}" android:pathPattern="${pathPattern}" android:scheme="${scheme}"/>
</intent-filter>
改为
<intent-filter android:order="1" android:autoVerify="true">
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.BROWSABLE"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:host="${host}" android:pathPattern="${pathPattern}" android:scheme="https"/>
<data android:scheme="http"/>
</intent-filter>
我试了下新的2.0.5版中已经修复了,用的就是我上面说的这种改法。
但是,在Google Play中发布时,报了另一个错。
「您必須為免安裝應用程式 APK 提供唯一的預設網址。」
解决办法是,加上下面这句。
<meta-data android:name="default-url" android:value="https://${host}${pathPattern}"/>
注意,这里说的AndroidManifest.xml文件,是位于proj.android-studio中的game文件夹下,而不是app文件夹下的那个,别改错地方了。
还有一种方法是在构建时让Default URL为空,就没有这些麻烦了。2.0.4版Default URL不能为空,2.0.5版修复了。