首页 > 解决方案 > 我在 Android 10 中收到 IMEI 号码错误

问题描述

我在 Android 10 中收到 IMEI 和 SIM 序列号错误,例外情况是 -

java.lang.SecurityException: getDeviceId: The user 10526 does not meet the requirements to access device identifiers.
java.lang.SecurityException: getIccSerialNumber: The user 10526 does not meet the requirements to access device identifiers.

标签: androidandroid-studiogradleimei

解决方案


我在 Android 10 中收到 IMEI 和 SIM 序列号错误

从 Android 10 开始,Google 增加了访问设备不可重置标识符的限制。

对于所有第三方应用程序(从 Google Play 商店安装),所有方法getImei()getDeviceId()getSerial()都将返回SecurityExceptionnull 。

无法在 Android 10 或更高版本的设备上获取 IMEI。

请参阅对不可重置设备标识符的限制


推荐阅读