jjzjj

AdaptiveIconDrawable

全部标签

android - com.google.firebase.messaging.zza : can't find referenced class android. graphics.drawable.AdaptiveIconDrawable

我正在尝试在我的应用程序中实现Firebase云消息传递(FCM)。我在Build.gradle中添加了以下依赖项并尝试构建发布构建变体。compile'com.google.firebase:firebase-messaging:15.0.0'Build.gradledependencies{compile'com.google.firebase:firebase-core:15.0.0'compile'com.google.firebase:firebase-messaging:15.0.0'}applyplugin:'com.google.gms.google-services'

android - 在 Android O 预览中将 AdaptiveIconDrawable 转换为位图

随着昨天发布的新预览版,我开始将我的应用程序更新到这个版本。我的应用程序的一部分是列出已安装的应用程序及其相关图标。Drawabledrawable=mPackageManager.getApplicationIcon(packageName);应用程序的这一部分仍然有效。时钟、计算器或消息等应用已经支持新版本的图标,因此它们返回一个AdaptiveIconDrawable。Bitmapbitmap=((BitmapDrawable)drawable).getBitmap();这部分不再起作用了。有没有其他方法可以将AdaptiveIconDrawable转换为Bitmap?提前致谢。