<span style="font-size:24px;color:#cc0000;"><span style="font-family: monospace; white-space: pre; background-color: rgb(240, 240, 240);"> </span><br style="font-family: monospace; white-space: pre;" /> public String getVersion() { try { PackageManager manager = this.getPackageManager(); PackageInfo info = manager.getPackageInfo(this.getPackageName(), 0); String version = info.versionName; return version; } catch (Exception e) { e.printStackTrace(); return "未发现版本"; } } </span>
原文地址:http://blog.csdn.net/u013425527/article/details/45196463