解析器
public class AaptParser
extends Object
java.lang.Object |
↳ | com.android.tradefed.util.AaptParser |
透過解析「aapt dump badging」的輸出從 apk 中提取資訊的類別。
aapt 必須位於 PATH 上
概括
嵌套類 |
---|
enum | AaptParser.AaptVersion 用於解析 APK 檔案的 AAPT 版本選項枚舉。 |
公共方法
取得標籤
public String getLabel ()
取得本地代碼
public getNativeCode ()
取得包名
public String getPackageName ()
取得SDK版本
public int getSdkVersion ()
取得目標SdkVersion
public int getTargetSdkVersion ()
取得版本號
public String getVersionCode ()
取得版本名稱
public String getVersionName ()
正在請求舊存儲
public boolean isRequestingLegacyStorage ()
檢查應用程式是否正在請求舊存儲。
退貨 |
---|
boolean | 如果 AndroidManifest.xml 中的 requestLegacyExternalStorage 為 true,則傳回 true 布林值 |
isUsingPermissionManageExternalStorage
public boolean isUsingPermissionManageExternalStorage ()
解析
public static AaptParser parse (File apkFile)
從 apk 解析資訊。
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2023-12-01 (世界標準時間)。
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"缺少我需要的資訊"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"過於複雜/步驟過多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"過時"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻譯問題"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/程式碼問題"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"容易理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"確實解決了我的問題"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]