This library won’t compile in my project. The only way I can make it compile is by removing the line:
.setForegroundServiceBehavior(NotificationCompat.FOREGROUND_SERVICE_IMMEDIATE);
in MediaProjectionNotification.java
Error message:
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
C:\Users\project\node_modules\react-native-webrtc\android\src\main\java\com\oney\WebRTCModule\MediaProjectionNotification.java:74: error: cannot find symbol
.setForegroundServiceBehavior(NotificationCompat.FOREGROUND_SERVICE_IMMEDIATE);
react-native: 0.68.2
react-native-webrtc: 118.0.7
~/android/build.gradle
buildscript {
ext {
buildToolsVersion = "31.0.0"
minSdkVersion = 23
compileSdkVersion = 33
targetSdkVersion = 33
if (System.properties['os.arch'] == "aarch64") {
// For M1 Users we need to use the NDK 24 which added support for aarch64
ndkVersion = "24.0.8215888"
} else {
// Otherwise we default to the side-by-side NDK version from AGP.
ndkVersion = "21.4.7075529"
}
}
I followed the readme instructions found here
Let me know if I need to post additional info