- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我们有几个动态功能模块。我们希望使用 ADB 和侧载轻松构建我们应用程序的调试版本。当我们使用 ./gradlew app:assembleDebug
时,我们的动态模块不包含在 apk 中。我知道有一种方法可以通过 Android Studio 执行此操作:
但是有没有办法使用 ADB 来做到这一点?基本上只是说“包括所有动态功能模块,就好像它们是基本模块的一部分”。
我还知道每个开发人员都可以使用 bundletool
为他们的测试设备组装/构建 apk。但是这个多步骤过程会减慢我们这些喜欢 CL gradle 的人的速度。
最佳答案
要么我一直在使用旧版本的 Android Gradle 插件,要么我调用的是 assemble
,而不是 install
。当使用 AGP 3.5.0-beta04
调用 ./gradlew app:installDebug
然后 bundletool 运行并自动上传必要的拆分 apks:
...
The APKs have been extracted in the directory: /var/folders/1g/mz8f0hgd0dg8ghy3pd_0llxm0000gn/T/apkSelect457573925930020942
Installing APKs 'base-xxhdpi.apk, base-master_2.apk, base-en.apk, base-x86_2.apk, my-dynamic-feature-xxhdpi.apk, my-dynamic-feature-master.apk' on 'Nexus_5X_API_25(AVD) - 7.1.1' for app:debug
01:30:05 I/SplitApkInstallerBase: Created install session 1503835220 with options -r -t -S 5653406
01:30:05 I/SplitApkInstaller: Uploading APK /var/folders/1g/mz8f0hgd0dg8ghy3pd_0llxm0000gn/T/apkSelect457573925930020942/base-xxhdpi.apk to session 1503835220
01:30:05 D/SplitApkInstaller: Executing : cmd package install-write -S 285980 1503835220 0_base-xxhdpi -
01:30:05 V/ddms: execute: running cmd package install-write -S 285980 1503835220 0_base-xxhdpi -
01:30:05 V/ddms: execute 'cmd package install-write -S 285980 1503835220 0_base-xxhdpi -' on 'emulator-5554' : EOF hit. Read: -1
01:30:05 V/ddms: execute: returning
01:30:05 D/SplitApkInstaller: Successfully uploaded base-xxhdpi.apk
01:30:05 I/SplitApkInstaller: Uploading APK /var/folders/1g/mz8f0hgd0dg8ghy3pd_0llxm0000gn/T/apkSelect457573925930020942/base-master_2.apk to session 1503835220
01:30:05 D/SplitApkInstaller: Executing : cmd package install-write -S 4887264 1503835220 1_base-master__ -
01:30:05 V/ddms: execute: running cmd package install-write -S 4887264 1503835220 1_base-master__ -
01:30:06 V/ddms: execute 'cmd package install-write -S 4887264 1503835220 1_base-master__ -' on 'emulator-5554' : EOF hit. Read: -1
01:30:06 V/ddms: execute: returning
01:30:06 D/SplitApkInstaller: Successfully uploaded base-master_2.apk
01:30:06 I/SplitApkInstaller: Uploading APK /var/folders/1g/mz8f0hgd0dg8ghy3pd_0llxm0000gn/T/apkSelect457573925930020942/base-en.apk to session 1503835220
01:30:06 D/SplitApkInstaller: Executing : cmd package install-write -S 32342 1503835220 2_base-en -
01:30:06 V/ddms: execute: running cmd package install-write -S 32342 1503835220 2_base-en -
01:30:06 V/ddms: execute 'cmd package install-write -S 32342 1503835220 2_base-en -' on 'emulator-5554' : EOF hit. Read: -1
01:30:06 V/ddms: execute: returning
01:30:06 D/SplitApkInstaller: Successfully uploaded base-en.apk
01:30:06 I/SplitApkInstaller: Uploading APK /var/folders/1g/mz8f0hgd0dg8ghy3pd_0llxm0000gn/T/apkSelect457573925930020942/base-x86_2.apk to session 1503835220
01:30:06 D/SplitApkInstaller: Executing : cmd package install-write -S 401632 1503835220 3_base-x____ -
01:30:06 V/ddms: execute: running cmd package install-write -S 401632 1503835220 3_base-x____ -
01:30:06 V/ddms: execute 'cmd package install-write -S 401632 1503835220 3_base-x____ -' on 'emulator-5554' : EOF hit. Read: -1
01:30:06 V/ddms: execute: returning
01:30:06 D/SplitApkInstaller: Successfully uploaded base-x86_2.apk
01:30:06 I/SplitApkInstaller: Uploading APK /var/folders/1g/mz8f0hgd0dg8ghy3pd_0llxm0000gn/T/apkSelect457573925930020942/my-dynamic-feature-xxhdpi.apk to session 1503835220
01:30:06 D/SplitApkInstaller: Executing : cmd package install-write -S 15362 1503835220 4_my-dynamic-feature-xxhdpi -
01:30:06 V/ddms: execute: running cmd package install-write -S 15362 1503835220 4_my-dynamic-feature-xxhdpi -
01:30:06 V/ddms: execute 'cmd package install-write -S 15362 1503835220 4_my-dynamic-feature-xxhdpi -' on 'emulator-5554' : EOF hit. Read: -1
01:30:06 V/ddms: execute: returning
01:30:06 D/SplitApkInstaller: Successfully uploaded my-dynamic-feature-xxhdpi.apk
01:30:06 I/SplitApkInstaller: Uploading APK /var/folders/1g/mz8f0hgd0dg8ghy3pd_0llxm0000gn/T/apkSelect457573925930020942/my-dynamic-feature-master.apk to session 1503835220
01:30:06 D/SplitApkInstaller: Executing : cmd package install-write -S 30826 1503835220 5_my-dynamic-feature-master -
01:30:06 V/ddms: execute: running cmd package install-write -S 30826 1503835220 5_my-dynamic-feature-master -
01:30:06 V/ddms: execute 'cmd package install-write -S 30826 1503835220 5_my-dynamic-feature-master -' on 'emulator-5554' : EOF hit. Read: -1
01:30:06 V/ddms: execute: returning
01:30:06 D/SplitApkInstaller: Successfully uploaded my-dynamic-feature-master.apk
01:30:06 V/ddms: execute: running cmd package install-commit 1503835220
01:30:14 V/ddms: execute 'cmd package install-commit 1503835220' on 'emulator-5554' : EOF hit. Read: -1
01:30:14 V/ddms: execute: returning
01:30:14 D/SplitApkInstaller: Successfully install apks: [/var/folders/1g/mz8f0hgd0dg8ghy3pd_0llxm0000gn/T/apkSelect457573925930020942/base-xxhdpi.apk, /var/folders/1g/mz8f0hgd0dg8ghy3pd_0llxm0000gn/T/apkSelect457573925930020942/base-master_2.apk, /var/folders/1g/mz8f0hgd0dg8ghy3pd_0llxm0000gn/T/apkSelect457573925930020942/base-en.apk, /var/folders/1g/mz8f0hgd0dg8ghy3pd_0llxm0000gn/T/apkSelect457573925930020942/base-x86_2.apk, /var/folders/1g/mz8f0hgd0dg8ghy3pd_0llxm0000gn/T/apkSelect457573925930020942/my-dynamic-feature-xxhdpi.apk, /var/folders/1g/mz8f0hgd0dg8ghy3pd_0llxm0000gn/T/apkSelect457573925930020942/my-dynamic-feature-master.apk]
Installed on 1 device.
关于android - 在没有 bundletool 的情况下从命令行使用动态功能模块构建 apk,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56690993/
我使用了我同事的新更新。然后他更改了 build.gradle 文件。但是我的 IDE 一直告诉我:Gradle 同步失败:找不到 bundletool.jar (com.android.tools.
虽然the docs提到 If you haven't already done so, download bundletool from the GitHubrepository. 然而,repo
我们有几个动态功能模块。我们希望使用 ADB 和侧载轻松构建我们应用程序的调试版本。当我们使用 ./gradlew app:assembleDebug 时,我们的动态模块不包含在 apk 中。我知道有
每当我尝试在 android studio 中构建或同步任何应用程序,甚至只是预览应用程序时,我都会收到错误 Could not download bundletool.jar (com.androi
我正在尝试按照 https://developer.android.com/studio/build/building-cmdline#bundletool-build 中描述的说明使用 bundle
本文整理了Java中com.android.tools.build.bundletool.model.ZipPath类的一些代码示例,展示了ZipPath类的具体用法。这些代码示例主要来源于Githu
本文整理了Java中com.android.tools.build.bundletool.io.ZipBuilder类的一些代码示例,展示了ZipBuilder类的具体用法。这些代码示例主要来源于Gi
本文整理了Java中com.android.tools.build.bundletool.model.utils.ZipUtils类的一些代码示例,展示了ZipUtils类的具体用法。这些代码示例主要
如 Bundletool Documentation 中所述 我在 Android Studio 终端上给出以下命令: bundletool build-apks --bundle=/MyApp/my
本文整理了Java中com.android.tools.build.bundletool.model.ZipPath.subpath()方法的一些代码示例,展示了ZipPath.subpath()的具
本文整理了Java中com.android.tools.build.bundletool.model.ZipPath.resolveSibling()方法的一些代码示例,展示了ZipPath.reso
本文整理了Java中com.android.tools.build.bundletool.model.ZipPath.endsWith()方法的一些代码示例,展示了ZipPath.endsWith()
本文整理了Java中com.android.tools.build.bundletool.model.ZipPath.toString()方法的一些代码示例,展示了ZipPath.toString()
本文整理了Java中com.android.tools.build.bundletool.model.ZipPath.startsWith()方法的一些代码示例,展示了ZipPath.startsWi
本文整理了Java中com.android.tools.build.bundletool.model.ZipPath.getNameCount()方法的一些代码示例,展示了ZipPath.getNam
本文整理了Java中com.android.tools.build.bundletool.model.ZipPath.resolve()方法的一些代码示例,展示了ZipPath.resolve()的具
本文整理了Java中com.android.tools.build.bundletool.model.ZipPath.getFileName()方法的一些代码示例,展示了ZipPath.getFile
本文整理了Java中com.android.tools.build.bundletool.model.ZipPath.getParent()方法的一些代码示例,展示了ZipPath.getParent
本文整理了Java中com.android.tools.build.bundletool.io.ZipBuilder.addDirectory()方法的一些代码示例,展示了ZipBuilder.add
本文整理了Java中com.android.tools.build.bundletool.io.ZipBuilder.()方法的一些代码示例,展示了ZipBuilder.()的具体用法。这些代码示例主
我是一名优秀的程序员,十分优秀!