【问题标题】:Notifee - Execution failed for task ':notifee_react-native:compileDebugJavaWithJavac'Notifee - 任务执行失败\':notifee_react-native:compileDebugJavaWithJavac\'
【发布时间】:2022-12-30 14:00:58
【问题描述】:

我使用 yarn 安装 Notifee 包,

yarn add @notifee/react-native

我运行后,

yarn start
yarn run android

抛出这样的错误,

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':notifee_react-native:compileDebugJavaWithJavac'.

我正在努力在我的 React Native 项目中实现通知。如果有人能帮助我,我真的很感激。谢谢。

【问题讨论】:

    标签: react-native push-notification


    【解决方案1】:

    由于 v 6.0.0 添加了 Android 13 支持,compiledSdkVersion 和 targetSdkVersion 应更改为 33。

    在你的项目android/build.gradle更改,

    compileSdkVersion = 33
    targetSdkVersion = 33
    

    更多参考, https://www.youtube.com/watch?v=Fxzi8Ug9NUA&ab_channel=CodewithMishen

    【讨论】:

    • 在 v.7.1.0、react-native 0.70.6 上对我来说效果很好
    猜你喜欢
    • 2020-03-07
    • 2023-03-15
    • 1970-01-01
    • 1970-01-01
    • 2018-08-20
    • 2016-05-02
    • 2022-01-19
    • 2021-11-14
    • 2019-02-15
    相关资源
    最近更新 更多