How can i get the build number of my android app?
This question already has an answer here:
简单而简短的方式:实施到您的活动中
String versionName = getApplicationContext().getPackageManager()
.getPackageInfo(getApplicationContext().getPackageName(), 0).versionName;
TextView tv=(TextView)findViewById(R.id.tv);
tv.setText(versionName);
链接地址: http://www.djcxy.com/p/90750.html