Android Instant App is uploaded but can not be roll out

断了今生、忘了曾经 提交于 2019-12-21 20:59:54

问题


UPDATE: 20170703 Using Android Studio 3.0 Canary 5 Modified some AndroidManifest and build.gradle files,

Moved from inside to inside for both Base's AndroidManifest and App's AndroidManifest, like below:

<application ...>
    <meta-data android:name="asset_statements" android:resource="@string/asset_statements" />
    <activity ...>
</application>

resource asset_statements:

<string name="asset_statements">[{\n  \"relation\": [\"delegate_permission/common.handle_all_urls\"],\n  \"target\": {\n    \"namespace\": \"web\",\n    \"site\": \"https://example.com\",\n  }\n}]</string>

The web verification is passed successfully (see screenshot below), uploaded new APK and ZIP (Instant App) but still same problem of can't rollout the Instant App.

Contacted google playstore support through "live chat", promised will get back but still no response after a few days.

------ OLD POST BELOW ------- I am using Android Studio 3.0 Canary 4 (preview).

Both Installable APK and Instant App (zip) are already uploaded successfully.

The Installable APK is already rolled out.

The Digital Assets Link json file already uploaded and verified in https://example.com/.well-known/assetlinks.json

I have only 1 Base module (feature module), inside the Base's AndroidManifest have only 1 activity:

<application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher"
        android:supportsRtl="true"
        android:theme="@style/AppTheme"
        >

        <activity
            android:name="com.example.test.app.base.activity.MainActivity"
            android:configChanges="locale|layoutDirection|orientation|keyboardHidden|screenSize"
            android:windowSoftInputMode="adjustResize"
            android:launchMode="singleTop"
            >

            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>

            <meta-data
                android:name="default-url"
                android:value="https://example.com/instantapp/.*" />

            <meta-data
                android:name="asset_statements"
                android:resource="@string/asset_statements" />

            <intent-filter android:order="1" 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" />
                <data android:scheme="https" />
                <data android:host="example.com" />
                <data android:pathPattern="/instantapp/.*"/>
            </intent-filter>

        </activity>
</application>

My assets_statements define in /res/string.xml :

<string name="asset_statements" translatable="false">
        [{
            \"include\": \"https://example.com/.well-known/assetlinks.json\"
        }]
</string>

So currently I believed every thing should be working fine because any configuration problem will be filtered when upload in Google Playstore, currently I can not rollout my Instant App because error :

Errors Resolve these errors before starting the rollout of this release.

Your site 'mysite.com' has not been linked through the Digital Assets Link protocol to your app. Please link your site through the Digital Assets Link protocol to your app.

Warnings

Check these warnings before starting the rollout of this release.

NOTE: example.com is only to replace my real domain.

Please help me to understand what is wrong and how to solve it ?


回答1:


If you are using Google Play App Signing then your local keystore contains the Upload Key, which is different than the App Signing Key.

In that case, the SHA256 fingerprint obtained with keytool is not the one you should include the Digital Assets Link json file.

The correct SHA256 fingerprint can be obtained in the Google Play Console, under Release Management / App Signing / App signing certificate.

Play Console Screenshot




回答2:


You need to use path pattern in your deep link: Make sure you are using your actual domain instead of example.com

https://example.com/instantapp


来源:https://stackoverflow.com/questions/44772959/android-instant-app-is-uploaded-but-can-not-be-roll-out

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!