无法找到类com.google.android.gms.common.kf.a引用的类'android.app.AppOpsManager' [英] Could not find class 'android.app.AppOpsManager', referenced from method com.google.android.gms.common.kf.a

查看:127
本文介绍了无法找到类com.google.android.gms.common.kf.a引用的类'android.app.AppOpsManager'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是android新手。我在我的应用上使用 Googlemap 活动。 minSdkVersio 15 tagetSdkVersion 21 。我对设备api 16以下有异常,我的代码完全适用于 api 16及以上。如何克服这个问题?
它表示行动条搜索的 Nullpointerexception 。我正在使用 appcompat v7

I am new to android. I am using Googlemap activity on my App. minSdkVersio 15 and tagetSdkVersion 21. I am getting following exception for the device api below 16 and my code works perfectly fine for api 16 and above. How to get over with this? It says Nullpointerexception for actionbar search. I am using appcompat v7.

08-08 12:37:17.359: E/dalvikvm(32201): Could not find class 'android.app.AppOpsManager', referenced from method com.google.android.gms.common.kf.a
08-08 12:37:17.379: E/dalvikvm(32201): Could not find class 'android.app.Notification$BigTextStyle', referenced from method com.google.android.gms.common.kf.b
08-08 12:37:17.900: E/dalvikvm(32201): Could not find class 'android.app.AppOpsManager', referenced from method com.google.android.gms.common.jy.a


推荐答案

错误中显示的类仅在API 16之后可用,您应该使用支持库中的等效项。例如,在api中引入了 android.app.Notification $ BigTextStyle 16,你需要使用 android.support.v4.app .NotificationCompat.BigTextStyle ,来自支持库的等效类,如果你想让它在api<的设备上工作的话。 16。

The classes displayed in the error are only available since API 16, and you should use the equivalent from the support libraries. e.g., android.app.Notification$BigTextStyle was introduced in api 16, you need to use android.support.v4.app.NotificationCompat.BigTextStyle, the equivalent class from the support library, if you want it to work on devices with api < 16.

如果这在您的代码中,您必须更改包含和可能的一些代码。如果它在谷歌地图中,​​那么您应该使用 SupportMapFragment 而不是常规的。

If this is in your code, you must change the includes and probably some code. If it's in google map, then you should probably use SupportMapFragment instead of the regular one.

这篇关于无法找到类com.google.android.gms.common.kf.a引用的类'android.app.AppOpsManager'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆