react-native-safe-area-context: Compile Error with v4
> Task :react-native-safe-area-context:compileDebugJavaWithJavac FAILED
/myapp/node_modules/react-native-safe-area-context/android/src/main/java/com/th3rdwave/safeareacontext/SafeAreaProviderManager.java:62: error: cannot find symbol
UIManagerHelper.getSurfaceId(reactContext), reactTag, insets, frame));
^
symbol: method getSurfaceId(ReactContext)
location: class UIManagerHelper
/myapp/node_modules/react-native-safe-area-context/android/src/main/java/com/th3rdwave/safeareacontext/InsetsChangeEvent.java:15: error: no suitable constructor found for Event(int,int)
super(surfaceId, viewTag);
^
constructor Event.Event() is not applicable
(actual and formal argument lists differ in length)
constructor Event.Event(int) is not applicable
(actual and formal argument lists differ in length)
Note: /myapp/node_modules/react-native-safe-area-context/android/src/main/java/com/th3rdwave/safeareacontext/SafeAreaUtils.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /myapp/node_modules/react-native-safe-area-context/android/src/main/java/com/th3rdwave/safeareacontext/SafeAreaContextPackage.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 errors
React Native Version: 0.64.3
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 2
- Comments: 29
Commits related to this issue
- Updated SDKVersion see comment: https://github.com/th3rdwave/react-native-safe-area-context/issues/245#issuecomment-1069046604 — committed to espipj/SalamancaBus by espipj a year ago
just set compilesdk version from 29; to => compileSdkVersion = 30 in android/build.gradle
I downgraded my react-native-safe-area-context to 3.3.2 and react-native-screens to 3.10.1 and it worked . Help me in resolving this error https://github.com/facebook/react-native/issues/33194
🎉 🎉 🎉 If you are using Yarn, try to:
Do the same with other package managers
thank you ! it solved my problem with error: react-native-safe-area-context:compileDebugKotlin
@Developeranees Cheers! That solved my issue 😃
@janicduplessis I can confirm that the issue has been fixed with 4.1.0. Works fine with react-native-screens 3.13.0 as well.
@jwisbeck you need to install 4.1.0, not 4.0.1
@Developeranees thanks that solved my problem. The project was done in expo before but started throwing error: react-native-safe-area-context:compileDebugKotlin after i moved to react cli. thanks for your solution
Thanks a Ton!! this worked for me with this error: react-native-safe-area-context:compileDebugKotlin