【问题标题】:'android.app.Notification$Builder' Class not found'android.app.Notification$Builder' 类未找到
【发布时间】:2023-03-15 20:06:01
【问题描述】:

背景

我正在努力使我的应用支持 2.3.3 版本(Api 级别 10),但出现以下错误。

日志

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

【问题讨论】:

    标签: android google-play-services google-cloud-messaging


    【解决方案1】:

    Notification.Builder 是在 API 级别 11 中添加的。对于早期版本,应使用 NotificationCompat.Builder 代替。

    由于错误来自 Google Play 服务,请使用 google_play_services_froyo 而不是 google_play_services 用于 pre-11 目标。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-05-14
      • 1970-01-01
      • 2019-08-22
      相关资源
      最近更新 更多