Closed MSetnik closed 1 year ago
Hi @MSetnik, can you run the following command in the project's home directory and test again?
cd android && ./gradlew clean && cd ..
Still doesnt work. Im on RN version 0.66.0 so that could be the issue
@MSetnik Do you get this error when you try to use the "setFitsSystemWindows" function of the this package? Can you share the versions of buildToolsVersion
, minSdkVersion
, compileSdkVersion
and targetSdkVersion
in your android/build.gradle
file?
As you said, react native version is very old and probably doesn't support setDecorFitsSystemWindows
. I can quickly release a new version. By the way, I suggest you to upgrade your React Native version as well.
buildToolsVersion = "30.0.2" minSdkVersion = 21 compileSdkVersion = 31 targetSdkVersion = 31 ndkVersion = "21.4.7075529"
The problem is I cannot currently upgrade RN version because app depends on older plugins :/
@MSetnik Got it. Do you get this error when you try to use the setFitsSystemWindows
function of this package in your project? Or are you getting this error when using a different function?
Still getting error after changing WindowCompat.setDecorFitsSystemWindows(view, enabled); to WindowCompat.setFitsSystemWindows(view, enabled);
node_modules/react-native-system-navigation-bar/android/src/main/java/com/reactnativesystemnavigationbar/SystemNavigationBarModule.java:289: error: cannot find symbol WindowCompat.setFitsSystemWindows(view, enabled); ^ symbol: method setFitsSystemWindows(Window,Boolean) location: class WindowCompat
App doesnt build because of that error
Have you tried using the previous version, version 2.5.2?
yarn add react-native-system-navigation-bar@2.5.2
Same problem here. Works on 2.5.0
, doesn't work on 2.6.0
. Downgrading is not ideal since we would like to have this fix available:
Hi @MSetnik, @dmitry-zaitsev I made the change for this issue. You can test the change in the latest version 2.6.1
Update: I'm closing this issue assuming the issue has been resolved. If your problem persists, feel free to reopen the issue.
Description
After installing plugin build for android fails with this error:
../node_modules/react-native-system-navigation-bar/android/src/main/java/com/reactnativesystemnavigationbar/SystemNavigationBarModule.java:289: error: cannot find symbol WindowCompat.setDecorFitsSystemWindows(view, enabled);
symbol: method setDecorFitsSystemWindows(Window,Boolean) location: class WindowCompat
react-native-system-navigation-bar version
2.6.0
React Native version
0.66.0
Snack, code example, screenshot, or link to a repository
No response