没有找到'android.app.Notification $生成器“类 [英] 'android.app.Notification$Builder' Class not found

查看:127
本文介绍了没有找到'android.app.Notification $生成器“类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

背景

我的工作让我的应用支持2.3.3版本(API等级10),但我得到了下面的错误。

登录

 找不到类的android.app.Notification $生成器',从方法引用
com.google.android.gms.common.GooglePlayServicesUtil.showErrorNotification


解决方案

Notification.Builder 在API级别11加入对于早期版本, NotificationCompat.Builder 应改为使用。

由于错误来自谷歌播放服务,使用 google_play_services_froyo 而不是 google_play_services 为pre-11目标。

Background

I'm working to make my app supporting 2.3.3 version (Api level 10), but i got the below error.

Log

Could not find class 'android.app.Notification$Builder', referenced from method    
com.google.android.gms.common.GooglePlayServicesUtil.showErrorNotification

解决方案

Notification.Builder was added in API level 11. For earlier versions, NotificationCompat.Builder should be used instead.

Since the error comes from Google Play Services, use google_play_services_froyo instead of google_play_services for pre-11 targets.

这篇关于没有找到'android.app.Notification $生成器“类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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