react-native-cookies / cookies

🍪 Cookie Manager for React Native
MIT License
480 stars 95 forks source link

CookieManagerModule.java has a local variable accessed from an inner class that's not declared final #148

Open yasithA opened 2 years ago

yasithA commented 2 years ago

When building for Android, the following build error occurs.

node_modules\@react-native-cookies\cookies\android\src\main\java\com\reactnativecommunity\cookies\CookieManagerModule.java:111: error: local variable promise is accessed from within inner class; needs to be declared final
                    promise.resolve(data);

If I go to the file in node_modules and make the promise variable final, the build succeeds.

kjurkovicafinitos commented 2 years ago

This is a duplicate of https://github.com/react-native-cookies/cookies/issues/146