📌  相关文章
📜  android 获取应用构建名称 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:29.663000             🧑  作者: Mango

代码示例1
try {
    PackageInfo pInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
    String version = pInfo.versionName;
} catch (PackageManager.NameNotFoundException e) {
    e.printStackTrace();
}