razorRun / react-native-vlc-media-player

React native media player for video streaming and playing. Supports RTSP, RTMP and other protocols supported by VLC player
https://roshan.digital/
MIT License
349 stars 184 forks source link

error: lambda expressions are not supported in -source 7 #202

Open DavidNguyen67 opened 6 months ago

DavidNguyen67 commented 6 months ago

i tried to update android/app/build.gradle

android {
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

and more ways but its not working someone can help me plz

Error image

environment variables image image

node version: 16.13.2

packages in project

  "dependencies": {
    "@googlemaps/google-maps-services-js": "^3.1.16",
    "@invertase/react-native-apple-authentication": "^2.1.5",
    "@microsoft/signalr": "^5.0.6",
    "@ngotientan/react-native-tuya": "^0.3.43",
    "@ptomasroos/react-native-multi-slider": "^2.2.2",
    "@react-native-async-storage/async-storage": "^1.17.10",
    "@react-native-clipboard/clipboard": "^1.8.4",
    "@react-native-community/checkbox": "^0.5.6",
    "@react-native-community/netinfo": "^6.0.0",
    "@react-native-community/push-notification-ios": "^1.8.0",
    "@react-native-community/slider": "3.x",
    "@react-native-cookies/cookies": "^6.0.7",
    "@react-native-firebase/app": "13.0.1",
    "@react-native-firebase/auth": "13.0.1",
    "@react-native-firebase/crashlytics": "13.0.1",
    "@react-native-firebase/messaging": "13.0.1",
    "@react-native-firebase/perf": "13.0.1",
    "@react-native-google-signin/google-signin": "^8.0.1",
    "@react-native-masked-view/masked-view": "^0.2.8",
    "@react-native-picker/picker": "^2.5.1",
    "@react-navigation/bottom-tabs": "^5.11.2",
    "@react-navigation/native": "^5.8.10",
    "@react-navigation/stack": "^5.12.8",
    "@reduxjs/toolkit": "^1.9.0",
    "@sentry/react-native": "^4.8.0",
    "aes-ecb": "^1.3.15",
    "axios": "~0.21",
    "build-url": "^6.0.1",
    "colorsys": "thanhtunguet/colorsys#master",
    "heremap": "^2.2.6",
    "i18next": "^20.3.0",
    "lodash": "^4.17.21",
    "md5": "^2.3.0",
    "moment": "^2.29.4",
    "node-sass": "^8.0.0",
    "patch-package": "^8.0.0",
    "postinstall-postinstall": "^2.1.0",
    "react": "17.0.1",
    "react-i18next": "^11.9.0",
    "react-native": "0.64.2",
    "react-native-awesome-alerts": "^2.0.0",
    "react-native-awesome-mqtt": "^0.2.0",
    "react-native-barcode-mask": "^1.2.4",
    "react-native-camera": "^4.2.1",
    "react-native-code-push": "^7.0.3",
    "react-native-config": "^1.4.2",
    "react-native-dash": "^0.0.11",
    "react-native-date-picker": "^3.2.10",
    "react-native-dev-menu": "^4.0.2",
    "react-native-device-info": "^8.1.3",
    "react-native-document-picker": "^8.1.1",
    "react-native-dots-pagination": "^0.2.0",
    "react-native-draggable-flatlist": "^3.1.2",
    "react-native-dropdown-select-list": "^2.0.4",
    "react-native-exception-handler": "^2.10.10",
    "react-native-expandable-slider": "^1.0.3",
    "react-native-fbsdk-next": "^4.3.0",
    "react-native-file-viewer": "^2.1.5",
    "react-native-flipper": "^0.174.0",
    "react-native-fs": "^2.20.0",
    "react-native-geolocation-service": "^5.2.0",
    "react-native-gesture-handler": "^1.10.3",
    "react-native-get-random-values": "^1.6.0",
    "react-native-haptic-feedback": "^1.11.0",
    "react-native-image-crop-picker": "^0.36.0",
    "react-native-inappbrowser-reborn": "^3.7.0",
    "react-native-keep-awake": "^4.0.0",
    "react-native-keychain": "^7.0.0",
    "react-native-light-color-picker": "^1.0.0-rc.8",
    "react-native-linear-gradient": "^2.6.2",
    "react-native-maps": "^1.3.2",
    "react-native-modal": "^13.0.1",
    "react-native-navigation-bar-color": "^2.0.2",
    "react-native-orientation": "^3.1.3",
    "react-native-otp-inputs": "^7.0.3",
    "react-native-pager-view": "^6.1.4",
    "react-native-permissions": "^3.8.4",
    "react-native-ping": "^1.2.7",
    "react-native-progress": "^5.0.0",
    "react-native-push-notification": "^8.1.1",
    "react-native-qrcode-svg": "^6.1.2",
    "react-native-quick-base64": "^2.0.7",
    "react-native-reanimated": "^2.14.4",
    "react-native-safe-area-context": "^3.1.9",
    "react-native-screens": "^2.18.1",
    "react-native-share": "^7.9.0",
    "react-native-simple-crypto": "^0.2.15",
    "react-native-spinkit": "^1.5.1",
    "react-native-splash-screen": "^3.2.0",
    "react-native-sqlite-storage": "^5.0.0",
    "react-native-svg": "^12.1.0",
    "react-native-switch": "^1.5.1",
    "react-native-tab-view": "^3.4.0",
    "react-native-toasty": "^1.0.2",
    "react-native-udp": "^4.1.7",
    "react-native-vector-icons": "^9.2.0",
    "react-native-video": "^5.2.1",
    "react-native-vlc-media-player": "^1.0.60",
    "react-native-webview": "^11.23.1",
    "react-native-wheel-picker-android": "^2.0.6",
    "react-redux": "^8.0.5",
    "react3l-advanced-filters": "^6.0.0-rc.1",
    "react3l-axios-observable": "^6.0.0-rc.1",
    "react3l-common": "^6.0.2-rc.1",
    "react3l-decorators": "^6.0.0-rc.1",
    "react3l-localization": "^6.0.0-rc.1",
    "reactn": "^2.2.7",
    "reactn-devtools": "^1.1.0",
    "redux": "^4.0.5",
    "reflect-metadata": "^0.1.13",
    "rn-async-storage-flipper": "^0.0.10",
    "rn-fetch-blob": "^0.12.0",
    "rxjs": "^7.5.7",
    "typeorm": "^0.2.38",
    "uuid": "^8.3.2"
  },
  "devDependencies": {
    "@babel/core": "^7.8.4",
    "@babel/plugin-proposal-decorators": "^7.12.1",
    "@babel/plugin-transform-runtime": "^7.14.2",
    "@babel/runtime": "^7.14.0",
    "@react-native-community/eslint-config": "^1.1.0",
    "@types/jest": "^25.2.3",
    "@types/lodash": "^4.14.165",
    "@types/md5": "^2.3.1",
    "@types/node": "^14.14.10",
    "@types/react-native": "^0.64.7",
    "@types/react-native-keep-awake": "^2.0.3",
    "@types/react-native-push-notification": "^7.2.0",
    "@types/react-native-scrollable-tab-view": "^0.10.3",
    "@types/react-native-vector-icons": "^6.4.14",
    "@types/react-native-video": "^5.0.15",
    "@types/react-test-renderer": "^16.9.2",
    "@types/uuid": "^8.3.0",
    "@typescript-eslint/eslint-plugin": "^4.19.0",
    "@typescript-eslint/parser": "^4.19.0",
    "appcenter-cli": "^2.10.2",
    "babel-jest": "^25.1.0",
    "babel-plugin-inline-dotenv": "^1.6.0",
    "babel-plugin-macros": "^3.0.0",
    "babel-plugin-module-resolver": "^4.0.0",
    "babel-plugin-transform-remove-console": "^6.9.4",
    "eslint": "^7.22.0",
    "eslint-plugin-react-hooks": "1.7.0",
    "husky": "^4.3.6",
    "jest": "^27.0.1",
    "lint-staged": "^13.0.3",
    "metro-config": "^0.65.2",
    "metro-react-native-babel-preset": "^0.65.2",
    "metro-react-native-babel-transformer": "^0.65.2",
    "node-directory-indexing": "^0.0.4",
    "npm-run-all": "^4.1.5",
    "pod-install": "^0.1.38",
    "postcss": "^8.1.14",
    "react-native-css-module": "^1.0.0",
    "react-native-postcss-transformer": "^1.2.4",
    "react-native-sass-transformer": "^1.4.0",
    "react-native-svg-transformer": "^0.14.3",
    "react-native-svg-types": "^1.0.0",
    "react-test-renderer": "16.13.1",
    "react3l-cli": "^1.1.2",
    "ts-nameof.macro": "^4.2.2",
    "typescript": "^4.2.3"
  }
chuanmin13 commented 1 month ago

@DavidNguyen67 Hi if this is still bothering you, you can try to add the compileOptions to android/build.gradle in node_modules/react-native-vlc-media-player instead.

I fixed the error by doing so and then create a patch file for this as well.

DavidNguyen67 commented 1 month ago

oh hi @chuanmin13, thank for replying me can you show me what compileOptions i need to add

chuanmin13 commented 1 month ago

Just the same as you did here should be good!

android {
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}
DavidNguyen67 commented 1 month ago

Just the same as you did here should be good!

android {
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

i did it before, but it not work i fixed it by go to android studio, chose quick fix and turn it into @anonymous