解析器
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,
AaptParser.AaptVersion aaptVersion)
从 apk 中解析信息。
参数 |
---|
apkFile | File :apk文件 |
aaptVersion | AaptParser.AaptVersion :aapt 版本 |
解析
public static AaptParser parse (File apkFile)
从 apk 中解析信息。
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):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":"其他"
}]