我使用的是 httputil 发请求,它给我回的是一段 json 字符串,我用 android5.0.2 的手机调试时,能正确返回 json 字符串,格式如下 :
{"desc":"OK","status":1000,"data":{"wendu":"21","ganmao":"天气转凉,空气湿度较大,较易发生感冒,体质较弱的朋友请注意适当防护。","forecast":[{"fengxiang":"东风","fengli":"3-4 级","high":"高温 24","type":"小雨","low":"低温 18","date":"6 日星期二"},{"fengxiang":"东南风","fengli":"4-5 级","high":"高温 23","type":"小雨","low":"低温 16","date":"7 日星期三"},{"fengxiang":"东北风","fengli":"微风级","high":"高温 22","type":"小雨","low":"低温 14","date":"8 日星期四"},{"fengxiang":"西风","fengli":"微风级","high":"高温 21","type":"晴","low":"低温 13","date":"9 日星期五"},{"fengxiang":"西北风","fengli":"3-4 级","high":"高温 19","type":"多云","low":"低温 12","date":"10 日星期六"}],"yesterday":{"fl":"微风","fx":"东风","high":"高温 22","type":"小雨","low":"低温 18","date":"5 日星期一"},"city":"马鞍山"}}
但是使用另一个 android4.0.3 的手机调试时,却得到返回的错误码,返回如下:
{"desc":"invilad-citykey","status":1002}
我在 AndroidManifest.xml 文件中设置的是
android:minSdkVersion="15"
android:targetSdkVersion="22"
/>
控制台报错如下:
01-02 11:32:46.609: E/PhonePolicy(5505): Could not preload class for phone policy: com.android.internal.policy.impl.PhoneWindow$ContextMenuCallback
01-02 12:40:20.569: E/dalvikvm(11859): Could not find class 'android.telephony.CellInfoGsm', referenced from method com.baidu.location.h.c.a
01-02 12:40:20.589: W/dalvikvm(11859): VFY: unable to resolve instanceof 1177 (Landroid/telephony/CellInfoGsm;) in Lcom/baidu/location/h/c;
01-02 12:40:20.529: W/dalvikvm(11859): VFY: unable to find class referenced in signature (Landroid/telephony/CellInfo;)
我使用了百度定位sdk,应该和这没关系吧
不知道怎么回事,希望遇到类似情形的前辈指导,不胜感激。
使用真机调试android程序遇到的奇怪问题
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
3条回答 默认 最新
悬赏问题
- ¥15 如何让企业微信机器人实现消息汇总整合
- ¥50 关于#ui#的问题:做yolov8的ui界面出现的问题
- ¥15 如何用Python爬取各高校教师公开的教育和工作经历
- ¥15 TLE9879QXA40 电机驱动
- ¥20 对于工程问题的非线性数学模型进行线性化
- ¥15 Mirare PLUS 进行密钥认证?(详解)
- ¥15 物体双站RCS和其组成阵列后的双站RCS关系验证
- ¥20 想用ollama做一个自己的AI数据库
- ¥15 关于qualoth编辑及缝合服装领子的问题解决方案探寻
- ¥15 请问怎么才能复现这样的图呀