Android:获取mainfest信息
1.获取versionName,versionCode
try { String version = this.getPackageManager().getPackageInfo(getPackageName(),0).versionName; int versionCode = this.getPackageManager().getPackageInfo(getPackageName(), 0).versionCode; } catch (NameNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); }