惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
SecWiki News
SecWiki News
博客园 - Franky
V
V2EX
罗磊的独立博客
美团技术团队
大猫的无限游戏
大猫的无限游戏
Simon Willison's Weblog
Simon Willison's Weblog
S
Securelist
C
Cyber Attacks, Cyber Crime and Cyber Security
Hugging Face - Blog
Hugging Face - Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Attack and Defense Labs
Attack and Defense Labs
WordPress大学
WordPress大学
Webroot Blog
Webroot Blog
N
News | PayPal Newsroom
博客园 - 司徒正美
V
Vulnerabilities – Threatpost
Scott Helme
Scott Helme
N
News and Events Feed by Topic
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Jina AI
Jina AI
腾讯CDC
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
雷峰网
雷峰网
Hacker News - Newest:
Hacker News - Newest: "LLM"
Cloudbric
Cloudbric
AI
AI
T
Threat Research - Cisco Blogs
PCI Perspectives
PCI Perspectives
N
News and Events Feed by Topic
Recent Commits to openclaw:main
Recent Commits to openclaw:main
月光博客
月光博客
Latest news
Latest news
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
Troy Hunt's Blog
Project Zero
Project Zero
Schneier on Security
Schneier on Security
TaoSecurity Blog
TaoSecurity Blog
博客园 - 【当耐特】
C
Cybersecurity and Infrastructure Security Agency CISA
量子位
P
Privacy & Cybersecurity Law Blog
博客园_首页
Last Week in AI
Last Week in AI
人人都是产品经理
人人都是产品经理
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
J
Java Code Geeks
P
Proofpoint News Feed

博客园 - 蓝风笨笨

简化问题的模式 模板模式和策略模式 为什么要优先使用组合而不是继承 SequenceFile介绍 基于Hadoop Sequencefile的小文件解决方案 Hadoop命令解释 Hadoop源代码分析之Configuration - 蓝风笨笨 onSaveInstanceState和onRestoreInstanceState触发的时机 术语解释 Android开发指南中文版(十四)User Interface-Binding to Data with AdapterView Windows环境下Android Sdk源码下载 Android开发指南中文版(十三)User Interface-Notifications Android开发指南中文版(十二)User Interface-Dialogs Serializable 和 Parcelable 区别 Android开发指南中文版(十一)User Interface-Menus Hierarchy Viewer Tool Android开发指南中文版(十)User Interface-Input Events Android开发指南中文版(九)User Interface-XML Layouts Android开发指南中文版(八)User Interface
Android 获取AndroidManifest.xml文件versionCode,versionName属性 .
蓝风笨笨 · 2012-01-29 · via 博客园 - 蓝风笨笨
1 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 }

AndroidManifest.xml:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package
="cn.nedu.math.ninebox"
android:versionCode
="1"
android:versionName
="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".NineBox"
android:label
="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-sdk android:minSdkVersion="3" />

</manifest>