【问题标题】:Expo-notifications ProguardExpo-notifications Proguard
【发布时间】:2021-06-04 05:09:39
【问题描述】:

我的项目已经实现了 expo-notifications 来处理本地通知。它在开发和生产中运行良好。但是如果我打开 Proguard,通知就不会出现。

proguard-rules.pro 的规则中,我有:

# expo-notifications

-keep class expo.modules.notifications.NotificationsScoper { *; }

这解决了我在构建版本时的问题,但没有弹出通知,出现在日志中:

03-05 11:29:45.634 22515-22557/? E/expo-notifications: Could not save notification "a4c57834-d4ad-4613-bc18-afa8cadd228d": org.json.JSONObject.

有人可以帮助我吗?谢谢!

【问题讨论】:

    标签: react-native proguard localnotification expo-notifications


    【解决方案1】:

    我终于解决了我的问题。

    我在 proguard-rules.pro 中添加了以下行:

    -keep class expo.modules.** { *; }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-10-27
      • 2022-08-22
      • 1970-01-01
      • 1970-01-01
      • 2021-08-22
      • 1970-01-01
      • 2022-12-01
      • 2021-08-03
      相关资源
      最近更新 更多