发布 Instant App 时:目标沙盒版本无效 [英] When publish Instant App:Invalid target sandbox version
问题描述
我尝试通过 Google Play 发布 Android Instant App.我可能会遇到问题
I try to publish the Android Instant App via Google Play. I might following problem
我尝试通过添加属性 android:targetSandboxVersion = "2" 来解决此问题,但仍然无效.
I try to solve this problem by adding the attribute android:targetSandboxVersion = "2", still not work.
一般问题有这些设置(build.gradle
)
In general, the problem has these settings(build.gradle
)
buildscript {
repositories {
maven { url 'https://maven.google.com' }
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-beta5'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
maven { url 'https://maven.google.com' }
jcenter()
google()
}
}
ext {
minSdkVersion = 26
targetSdkVersion = 26
compileSdkVersion = 26
buildToolsVersion = '26.0.1'
androidSupport = '26.0.0'
versionCode = 5
versionName = "1.1"
}
task clean(type: Delete) {
delete rootProject.buildDir
}
======
正如所评论的,我通过添加语句 android:targetSandboxVersion = "2"
来修改基本功能,然后我无法按照显示的错误进行编译,即使我清理、重建项目.
As commented, I revise the base feature by adding the statement android:targetSandboxVersion = "2"
, then I cannot go through the compiling as errors shown, even if I clean, rebuild the project.
推荐答案
更新答案:
这是一个已修复的错误.您不再需要将 targetSandboxVersion
添加到您的可安装应用程序中,我不建议您这样做,因为该功能尚未在任何地方记录或描述.
This was a bug that has since been fixed. You no longer need to add targetSandboxVersion
to your installable app, and I don't recommend doing so, since the feature isn't yet documented or described anywhere.
当我最初建议添加该属性时,我相信文档会在 O 手机发布之前发布.相反,负责添加此验证的团队意识到了他们的错误.
When I recommended adding the attribute originally, I believed that documentation would be forthcoming, before the release of an O phone. Instead, the team responsible for adding this validation realized their mistake.
但是,您的免安装应用中仍然需要 targetSandboxVersion
.由于我们不允许没有该属性的免安装应用程序,只需将其视为必需的魔法短语即可.
However, you do still need targetSandboxVersion
in your instant app. Since we don't allow instant apps without that attribute, just consider it a required magic phrase.
原答案:
如消息所述,您需要在已发布的可安装应用的清单中使用 targetSandboxVersion
.
As the message says, you need targetSandboxVersion
in the manifest of your published installable app.
这样做会对您在 O 设备上安装的应用设置一些限制,这使得 O 安装程序可以更轻松地将您的免安装应用升级为安装版.
Doing so places some restrictions on your installed app on O devices, and that makes it easier for the O installer to upgrade your instant app to installed.
这篇关于发布 Instant App 时:目标沙盒版本无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!