//get IMEI码标签:String,SERVICE,get,SystemProperties,获取,IMEI,Android,android From: https://blog.51cto.com/u_15170706/6114559
String IMEI = this.getSystemService(Context.TELEPHONY_SERVICE).getDeviceId();
String myIMSI =android.os.SystemProperties.get(android.telephony.TelephonyProperties.PROPERTY_IMSI);
//打印
System.out.println("IMEI:" + IMEI);
修改Manifest.xml中权限:
<uses-permission android:name="android.permission.READ_PHONE_STATE" />