android AndroidManifest.xml package名

引用:http://kb.cnblogs.com/a/2331026/

 try {
2
3 packagemanager pm = getPackageManager();
4
5 PackageInfo pinfo = pm.getPackageInfo(gerPackageName(), PackageManager.GET_CONFIGURATIONS);
6 String versionCode = pinfo.versionName;
7 Strint versionName = pinfo.versionCode;
8 } catch (NameNotFoundException e) {
9 }
posted @ 2012-05-18 16:26  镇水古月  阅读(262)  评论(0编辑  收藏  举报