String filePath = "E:\\AS\\work1\\gudingzichan\\android\\FixedAssets\\app\\release\\资产.apk";
try (ApkFile apkFile = new ApkFile(new File(filePath))) {
ApkMeta apkMeta = apkFile.getApkMeta();
System.out.println(apkMeta.getName());
System.out.println(apkMeta.getPackageName());
System.out.println(apkMeta.getVersionCode());
System.out.println(apkMeta.getVersionName());
for (UseFeature feature : apkMeta.getUsesFeatures()) {
System.out.println(feature.getName());
}
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
解析包 github地址:https://github.com/hsiafan/apk-parser
jar 下载地址 http://download.csdn.net/download/qq_28934205/10261603