使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
public
class
BundletoolUtil
extends Object
java.lang.Object 中
|
↳ |
com.android.tradefed.util.BundletoolUtil
|
该实用程序类使用 bundletool 命令行在设备上安装 .apk。bundletool 文档
链接:https://developer.android.com/studio/command-line/bundletool
随模块文件一起从未捆绑模块分支下载。
摘要
公共方法 |
File
|
extractSplitsFromApks(File apks, String deviceSpecPath, ITestDevice device, IBuildInfo buildInfo)
从 .apk 中提取拆分的 apk/apex。
|
String
|
generateDeviceSpecFile(ITestDevice device)
为已连接的设备配置生成 JSON 文件。
|
void
|
installApks(File apks, ITestDevice device)
安装使用 bundletool 的 apk .apk。
|
公共构造函数
public BundletoolUtil (File bundletoolJar)
公共方法
从 APK 提取拆分
public File extractSplitsFromApks (File apks,
String deviceSpecPath,
ITestDevice device,
IBuildInfo buildInfo)
从 .apk 中提取拆分的 apk/apex。重命名分块并将分块存储到
.apk 的存储目录中。返回存储拆分包的新目录。
参数 |
apks |
File :需要解压缩的 APK |
deviceSpecPath |
String :bundletool 用于提取 apk 的设备规范文件 |
device |
ITestDevice :已连接的设备 |
buildInfo |
IBuildInfo :build 工件信息 |
generateDeviceSpecFile
public String generateDeviceSpecFile (ITestDevice device)
为已连接的设备配置生成 JSON 文件。
参数 |
device |
ITestDevice :已连接的设备 |
返回 |
String |
表示设备规范文件的路径的 String 。
|
安装 APK
public void installApks (File apks,
ITestDevice device)
安装使用 bundletool 的 apk .apk。
参数 |
apks |
File :需要安装的 APK |
device |
ITestDevice :已连接的设备
|
受保护的方法
getAdbPath
protected String getAdbPath ()
protected File getBundletoolFile ()
getRunUtil
protected IRunUtil getRunUtil ()
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-08-22。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2024-08-22。"],[],[]]