Prior to 4 November it was working fine and now when I am trying to build it by running yarn android but it is showing me
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
/Users/dev/Desktop/Abc Projects/aargee/node_modules/react-native-webrtc/android/src/main/java/com/oney/WebRTCModule/VideoTrackAdapter.java:5: error: cannot access VideoFrame
import org.webrtc.VideoFrame;
^
bad class file: /Users/dev/.gradle/caches/transforms-2/files-2.1/8af035e80c335f19cef40762b46ee77a/jetified-libwebrtc.jar(org/webrtc/VideoFrame.class)
class file has wrong version 55.0, should be 52.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-webrtc:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
"react-native": "^0.66.3",
"react-native-webrtc": "^1.94.1",
I have tried solution from My React Native was working fine upto 4 November but now throwing an exception while Running yarn android
but no luck. Any help will be appreciated.
2
Answers
android/.idea
,android/.gradle
,androidbuild
&androidappbuild
folders from your project if existhttps://stackoverflow.com/a/30450020/10657559
https://stackoverflow.com/a/74371195/10657559
Replace the below section in android/build.gradle