I install Notifee package using yarn,
yarn add @notifee/react-native
After I run it,
yarn start
yarn run android
Throws an error like this,
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':notifee_react-native:compileDebugJavaWithJavac'.
I’m struggling to implement notifications in my React Native project. Really appreciate it if somebody could help me. Thanks.
3
Answers
As in v 6.0.0 added Android 13 support the compiledSdkVersion and targetSdkVersion should be changed to 33.
In your project
android/build.gradle
change,More reference, https://www.youtube.com/watch?v=Fxzi8Ug9NUA&ab_channel=CodewithMishen
In case if someone doesn’t want to change the compileSdkVersion (maybe because other library will have compileDebugJavaWithJavac error) then they can try:
and keep the compileSdkVersion the same as before
Add this in the
allprojects
area of yourandroid/buld.gradle
file.https://github.com/facebook/react-native/issues/35210