java.lang.securityException:无法制作java.lang.reflect.Method构造函数可访问的FCM
发送firebase推送通知时,我在按钮上遇到此错误
private fun sendNotification(notification: PushNotification) = CoroutineScope(Dispatchers.IO).launch {
try {
val response = RetrofitInstance.api.postNotification(notification)
if (response.isSuccessful){
Log.d(TAG, "Response: ${Gson().toJson(response)}")
}else{
Log.e(TAG, response.errorBody().toString())
}
}catch (e: Exception){
Log.e(TAG, e.toString())
}
}
I am getting this error on button clicked when sending firebase push notification
private fun sendNotification(notification: PushNotification) = CoroutineScope(Dispatchers.IO).launch {
try {
val response = RetrofitInstance.api.postNotification(notification)
if (response.isSuccessful){
Log.d(TAG, "Response: ${Gson().toJson(response)}")
}else{
Log.e(TAG, response.errorBody().toString())
}
}catch (e: Exception){
Log.e(TAG, e.toString())
}
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论