gpt4 book ai didi

javascript - 将图像添加到node_modules包

转载 作者:行者123 更新时间:2023-11-28 03:23:54 26 4
gpt4 key购买 nike

我正在使用react-native模块(React-native-pjsip)的fork,并且需要在通知中使用以下图像:

NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this, "")
.setContentTitle("My app Name")
.setSmallIcon(android.R.drawable.ic_launcher)
.setContentText("The app is running on foreground!")
.setContentIntent(openAppPendingIntent)
.addAction(action)
.setOngoing(true)
.setPriority(NotificationCompat.PRIORITY_MIN);



问题是:
没有可绘制的文件夹,并且我没有创建一个成功的文件夹。

ic_launcher文件是我自己的应用程序图标,通知运行良好,唯一的问题是自定义图标本身。

我编译时的错误是:

error: cannot find symbol
.setSmallIcon(android.R.drawable.ic_launcher)
^
symbol: variable ic_launcher
location: class drawable

最佳答案

解决方案是:使用“ R.drawable.ic_launcher”代替“ android.R.drawable.ic_launcher”

关于javascript - 将图像添加到node_modules包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58844226/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com