【发布时间】:2017-11-11 02:57:22
【问题描述】:
我有一个包含以下模块的即时应用程序:
- 基本功能
- 功能1
- 功能2
- 已安装
- 即时
我希望installed 同时拥有feature1 和feature2,而instant 只有feature1。
即时build.gradle:
apply plugin: 'com.android.instantapp'
dependencies {
implementation project(':base')
implementation project(':feature1')
}
已安装build.gradle:
apply plugin: 'com.android.application'
dependencies {
implementation project(':base')
implementation project(':feature1')
implementation project(':feature2')
}
我想测试上传到 Google Play 开发者控制台,所以我创建了 instant 应用发布版本。它包含base 和feature1 apks,但是当我将它上传到控制台时,我得到了错误:
Your Instant App APKs contains an APK name 'feature2' that either does not exist or was not included.
我做错了什么? installed 和 instant 应用程序可以有不同的功能集,对吧?
【问题讨论】:
-
实施项目(':feature1') 实施项目(':feature2')。工具中有一个错误会忽略功能名称中的数字,因此这两个功能最终都是“功能”。这可能会导致一些问题。使用特性的专有名称。例如“listing_feature”、“details_feature”
-
@Anirudh 谢谢,但这些名称只是举例。功能在我的项目中有专有名称。
标签: android android-gradle-plugin android-instant-apps