mieszko4 / react-native-zoom-us

MIT License
126 stars 118 forks source link

App Is not Building in Android #237

Closed skychavda closed 2 years ago

skychavda commented 2 years ago

I am facing the same issue while I do npm run android then this erros are showing up

node_modules/react-native-zoom-us/android/src/main/java/ch/milosz/reactnative/RNZoomUsModule.java:98: error: local variable intent is accessed from within inner class; needs to be declared final
              startZoomScreenShare(intent);
                                   ^
node_modules/react-native-zoom-us/android/src/main/java/ch/milosz/reactnative/RNZoomUsModule.java:235: error: local variable promise is accessed from within inner class; needs to be declared final
            promise.reject("ERR_ZOOM_START", "ZoomSDK has not been initialized successfully");
            ^
node_modules/react-native-zoom-us/android/src/main/java/ch/milosz/reactnative/RNZoomUsModule.java:246: error: local variable promise is accessed from within inner class; needs to be declared final
              promise.reject("ERR_ZOOM_START", "Invalid meeting number: " + meetingNo);
              ^
node_modules/react-native-zoom-us/android/src/main/java/ch/milosz/reactnative/RNZoomUsModule.java:252: error: local variable promise is accessed from within inner class; needs to be declared final
              promise.resolve("Already joined zoom meeting");
              ^
node_modules/react-native-zoom-us/android/src/main/java/ch/milosz/reactnative/RNZoomUsModule.java:281: error: local variable promise is accessed from within inner class; needs to be declared final
          meetingPromise = promise;
                           ^
node_modules/react-native-zoom-us/android/src/main/java/ch/milosz/reactnative/RNZoomUsModule.java:292: error: local variable promise is accessed from within inner class; needs to be declared final
          promise.reject("ERR_UNEXPECTED_EXCEPTION", ex);
          ^
node_modules/react-native-zoom-us/android/src/main/java/ch/milosz/reactnative/RNZoomUsModule.java:310: error: local variable promise is accessed from within inner class; needs to be declared final
            promise.reject("ERR_ZOOM_JOIN", "ZoomSDK has not been initialized successfully");
            ^
node_modules/react-native-zoom-us/android/src/main/java/ch/milosz/reactnative/RNZoomUsModule.java:366: error: local variable promise is accessed from within inner class; needs to be declared final
          meetingPromise = promise;
                           ^
node_modules/react-native-zoom-us/android/src/main/java/ch/milosz/reactnative/RNZoomUsModule.java:379: error: local variable promise is accessed from within inner class; needs to be declared final
          promise.reject("ERR_UNEXPECTED_EXCEPTION", ex);
          ^
node_modules/react-native-zoom-us/android/src/main/java/ch/milosz/reactnative/RNZoomUsModule.java:396: error: local variable promise is accessed from within inner class; needs to be declared final
            promise.resolve(null);
            ^
node_modules/react-native-zoom-us/android/src/main/java/ch/milosz/reactnative/RNZoomUsModule.java:401: error: local variable promise is accessed from within inner class; needs to be declared final
          promise.resolve(null);
          ^
node_modules/react-native-zoom-us/android/src/main/java/ch/milosz/reactnative/RNZoomUsModule.java:403: error: local variable promise is accessed from within inner class; needs to be declared final
          promise.reject("ERR_UNEXPECTED_EXCEPTION", ex);
          ^
node_modules/react-native-zoom-us/android/src/main/java/ch/milosz/reactnative/RNZoomUsModule.java:416: error: local variable promise is accessed from within inner class; needs to be declared final
          promise.resolve(null);
          ^
node_modules/react-native-zoom-us/android/src/main/java/ch/milosz/reactnative/RNZoomUsModule.java:418: error: local variable promise is accessed from within inner class; needs to be declared final
          promise.reject("ERR_UNEXPECTED_EXCEPTION", ex);
          ^

Note: node_modules/react-native-zoom-us/android/src/main/java/ch/milosz/reactnative/RNZoomUsModule.java uses or overrides a deprecated API

@mieszko4 Is you have any Idea to resolve this I followed all the step after package is installed. Help me with it.

mieszko4 commented 2 years ago

My guess is that you use some newer version of java that is more strict. It should be easy to fix. Could you provide which version of java you use (java --version)?

skychavda commented 2 years ago

Here is my java version: openjdk 11.0.16

skychavda commented 2 years ago

@mieszko4 Any update for the same? Cause this is a blockage in our application due to this error whole application stops working.

amdrade commented 2 years ago

helo, try this [#227]

amitkumar144 commented 2 years ago

Try this on Android Manifest.xml <application tools:replace="allowBackup" for release build --tools:replace="allowBackup,usesCleartextTraffic" for debug build -- tools:replace="allowBackup"