首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法解析“getEarfcn”中的“CellIdentityLte”方法

无法解析“getEarfcn”中的“CellIdentityLte”方法
EN

Stack Overflow用户
提问于 2020-11-11 10:44:28
回答 1查看 96关注 0票数 0
代码语言:javascript
复制
TelephonyManager tm = (TelephonyManager)getSystemService(TELEPHONY_SERVICE);
    CellInfo ci = tm.getAllCellInfo().get(0) ; // Registered Cell Tower

if (ci instanceof CellInfoGsm)  {
        ((CellInfoGsm)ci).getCellIdentity().getArfcn();
    } else if (ci instanceof CellInfoWcdma) {
        ((CellInfoWcdma)ci).getCellIdentity().getUarfcn();
    } else if (ci instanceof CellInfoLte) {
        ((CellInfoLte)ci).getCellIdentity().getEarfcn();
    }

错误:

'CellIdentityLte'

  • Cannot中的
  1. 不能解析方法getEarfcn在'CellIdentityWcdma'

中的getArfcn解析方法

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-11-11 11:49:03

解决问题;

安装sdkversion到24没有引起注意,这是在API 24中添加的。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64784904

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档