简体   繁体   English

即时应用程序,立即尝试按钮不会出现在 Play 商店中

[英]Instant app, Try Now button does not appear in play store

i started with following github projects but these example are not working properly.我从关注 github 项目开始,但这些示例无法正常工作。 I added missing parts as stated in the docs.我添加了文档中所述的缺失部分。 https://github.com/android/app-bundle-samples/tree/main/InstantApps/urlless https://github.com/googlecodelabs/android-dynamic-features https://github.com/android/app-bundle-samples/tree/main/InstantApps/urlless https://github.com/googlecodelabs/android-dynamic-features

Here is the docs i read.这是我阅读的文档。 https://developer.android.com/topic/google-play-instant/getting-started/instant-enabled-app-bundle https://developer.android.com/topic/google-play-instant/feature-module-migrationhttps://developer.android.com/guide/app-bundle/instant-delivery https://developer.android.com/topic/google-play-instant/getting-started/instant-enabled-app-bundle https://developer.android.com/topic/google-play-instant/feature-module -迁移 https://developer.android.com/guide/app-bundle/instant-delivery

i try to implement a simple hello world instant app.我尝试实现一个简单的 hello world 即时应用程序。 I tried many things but try now button never appears in play store.我尝试了很多东西,但现在尝试按钮从未出现在 Play 商店中。

my app contains 2 module:我的应用程序包含 2 个模块:

  • app应用程序
  • instant-app即时应用

build.gradle of app module:应用模块的build.gradle:

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'

android {
    compileSdkVersion 30
    defaultConfig {

        minSdkVersion 21
        targetSdkVersion 30
        versionCode 61
        versionName "61"
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled true
            shrinkResources false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        debug {
            debuggable true
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    dynamicFeatures = [':instantapp']
}

dependencies {
    ...
    implementation "com.google.android.gms:play-services-instantapps:17.0.0"
    implementation "com.google.android.play:core:1.9.0"
    ...
}

build.gradle of my instant-app module我的即时应用模块的 build.gradle

plugins {
    id 'com.android.dynamic-feature'
}
android {
    compileSdkVersion 30
    buildToolsVersion "30.0.2"

    defaultConfig {
        applicationId "com.test.myapp"
        minSdkVersion 21
        targetSdkVersion 30
        versionCode 3
        versionName "1.2"
    }
}

dependencies {
    
    implementation "com.google.android.play:core:1.9.0"
   
}

AndroidManifest.xml of my app module我的应用程序模块的 AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest >

    <dist:module dist:instant="true" />

    ...

</manifest>

AndroidManifest.xml of my instant-app module我的即时应用模块的 AndroidManifest.xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:dist="http://schemas.android.com/apk/distribution"
    package="com.test.instantapp"
    android:targetSandboxVersion="2">

    <dist:module dist:instant="true" dist:onDemand="false"
        dist:title="Instant app title">
        <dist:fusing dist:include="true" />
    </dist:module>

    <application android:usesCleartextTraffic="false">
        <activity android:name=".InstantMainActivity">
            <intent-filter>
               <action android:name="android.intent.action.MAIN" />
               <category android:name="android.intent.category.LAUNCHER" />
           </intent-filter>
        </activity>
    </application>

  
</manifest>

I generate a signed bundle and upload it in internal test in each of my try but it did not work.我生成了一个签名包,并在每次尝试中将其上传到内部测试中,但它不起作用。 i tried it in prod environment too.我也在产品环境中尝试过。 Not work!不行!

I tried to put applicationId "com.test.myapp" in both app module and instant-app module.我试图将 applicationId "com.test.myapp" 放在应用程序模块和即时应用程序模块中。 I tried to made android:targetSandboxVersion="2" and android:targetSandboxVersion="1".我尝试制作 android:targetSandboxVersion="2" 和 android:targetSandboxVersion="1"。 Not work.不行。 Version code of my app is greater than version code of my instant-app as shown below.我的应用程序的版本代码大于我的免安装应用程序的版本代码,如下所示。

I removed clearTextTraffic and added.我删除了 clearTextTraffic 并添加了。 Not work!不行!

Some said me to take my instant app enabled code to take into production and upload a new upgraded instant app version.有人说我将启用即时应用程序的代码投入生产并上传新的升级即时应用程序版本。 I did it, it did not work either.我做到了,它也没有工作。

I tried many many combinations which i cannot remember now.我尝试了许多我现在不记得的组合。 But try now button never appears.但是现在尝试按钮永远不会出现。 What is the missing part i cannot find?我找不到的缺失部分是什么?

There are 3 different sayings for maximum size of instant-app module:关于 Instant-app 模块的最大大小有 3 种不同的说法:

  • 4 mb 4 MB
  • 10 mb 10 兆
  • 15 mb Why the source codes and docs are conflicting too much and there is no working code in github? 15 mb 为什么源代码和文档冲突太多,github 中没有工作代码? If i didn't see working samples in play store, i would think instant apps are dead.如果我在 Play 商店中没有看到工作样本,我会认为即时应用程序已经死了。

open play store -> select app-> open advanced settings -> add release type instant app打开Play商店-> select应用->打开高级设置->添加发布类型即时应用

在此处输入图像描述

Then upload your instant app from instant apps only option:然后从仅即时应用选项上传您的即时应用:

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 启用即时应用功能的已发布 Play 商店应用程序上未显示“立即尝试”按钮 - Try Now button is not showing on published play store application having Instant app feature enabled 即时应用程序未从“立即尝试”按钮加载 - Instant App not loading from "Try Now" button 如何在 Google Play 上制作没有“立即尝试”按钮的 Android Instant App? - How to make Android Instant App without “try now” button on google play? 是否可以在保持激活即时应用程序链接的同时隐藏商店中的“立即尝试”按钮? - Is it possible to hide "try now" button from the store while keeping link to instant app activated? Android Production Instant App 未在 Google Playstore 中显示“立即试用”按钮 - Android Production Instant App not showing "Try Now" button in google playstore 单击立即尝试按钮时,即时应用崩溃 - Instant App Crash When Click on Try Now button 即时应用预发布版未在 Playstore 中显示“立即尝试”按钮 - Instant app pre-release not showing try now button in playstore Android即时应用播放商店错误 - Android Instant App Play Store Errors 发布的应用未出现在Play商店类别列表中 - Published app does not appear in a play store category list 无法在 Play 商店提交免安装应用 - 基本 APK 错误 - Failed to submit instant app on play store - Base APK error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM