private static int testPackageInfo(Context context){ int localVersionCode = 9999; try { PackageInfo packageInfo = context.getPackageManager().getPackageInfo(context.getPackageName(),0); String localVersionName =packageInfo.versionName; System.out.print(localVersionName); localVersionCode = packageInfo.versionCode; System.out.print(localVersionCode); }catch (Exception e) {} return localVersionCode; }
时间: 2024-10-03 02:06:27