透過集合功能整理內容
你可以依據偏好儲存及分類內容。
public
class
BundletoolUtil
extends Object
java.lang.Object
|
↳ |
com.android.tradefed.util.BundletoolUtil
|
使用 bundletool 指令列在 Deivce 上安裝 .apk 的公用程式類別。Bundletool 文件
連結:https://developer.android.com/studio/command-line/bundletool。 bundletool.jar 是
從未封裝模組分支版本下載,以及模組檔案。
摘要
公用方法 |
File
|
extractSplitsFromApks(File apks, String deviceSpecPath, ITestDevice device, IBuildInfo buildInfo)
從 .apks 中擷取分割的 apk/apex。
|
String
|
generateDeviceSpecFile(ITestDevice device)
產生已連結裝置設定的 JSON 檔案。
|
void
|
installApks(File apks, ITestDevice device)
安裝使用 bundletool 的 apk .apk。
|
公用建構函式
public BundletoolUtil (File bundletoolJar)
公用方法
擷取 SplitsFromApks
public File extractSplitsFromApks (File apks,
String deviceSpecPath,
ITestDevice device,
IBuildInfo buildInfo)
從 .apks 中擷取分割的 apk/apex。重新命名分割,並將分割項儲存至
儲存 .apks 所在的目錄。傳回分割儲存的新目錄。
參數 |
apks |
File :需要擷取的 APK |
deviceSpecPath |
String : bundletool 用來擷取 APK 的裝置規格檔案 |
device |
ITestDevice :已連結的裝置 |
buildInfo |
IBuildInfo :版本構件資訊 |
generateDeviceSpecFile
public String generateDeviceSpecFile (ITestDevice device)
產生已連結裝置設定的 JSON 檔案。
參數 |
device |
ITestDevice :已連結的裝置 |
installApks
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 和/或其關係企業的商標或註冊商標。
上次更新時間: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"]],["上次更新時間:2024-08-22 (世界標準時間)。"],[],[]]