经常需要在AndroidManifest.xml中配置sdk号,比如:android:minSdkVersion=”4”,却老记不清SDK与API版本的对应关系,查找后总结如下,供以后查看:
第一行为版本命名,一般都是甜点 第二行为SDK,也就是平常经常说的android版本 第三行为API版本,开发者经常用到
AndroidWear(穿戴系统) Android 4.4w - API Level 20 Lollipop 5.0 API Level 21
下面这段转自: http://www.cnblogs.com/hope250/archive/2011/04/04/2005409.html
有时候需要统计手机的型号和版本号,利用程序可以获取到相应的手机信息,对比两部手机发现,厂商不同,某个信息显示方式也不尽相同,具体见:
代码语言:javascript复制String phoneInfo = "Product: " android.os.Build.PRODUCT;
phoneInfo = ", CPU_ABI: " android.os.Build.CPU_ABI;
phoneInfo = ", TAGS: " android.os.Build.TAGS;
phoneInfo = ", VERSION_CODES.BASE: " android.os.Build.VERSION_CODES.BASE;
phoneInfo = ", MODEL: " android.os.Build.MODEL;
phoneInfo = ", SDK: " android.os.Build.VERSION.SDK;
phoneInfo = ", VERSION.RELEASE: " android.os.Build.VERSION.RELEASE;
phoneInfo = ", DEVICE: " android.os.Build.DEVICE;
phoneInfo = ", DISPLAY: " android.os.Build.DISPLAY;
phoneInfo = ", BRAND: " android.os.Build.BRAND;
phoneInfo = ", BOARD: " android.os.Build.BOARD;
phoneInfo = ", FINGERPRINT: " android.os.Build.FINGERPRINT;
phoneInfo = ", ID: " android.os.Build.ID;
phoneInfo = ", MANUFACTURER: " android.os.Build.MANUFACTURER;
phoneInfo = ", USER: " android.os.Build.USER;
// Toast.makeText(this, phoneInfo, Toast.LENGTH_LONG).show();
TextView t = (TextView) findViewById(R.id.main_phoneinfo);
t.setText(phoneInfo);