mrousavy / react-native-vision-camera

📸 A powerful, high-performance React Native Camera library.
https://react-native-vision-camera.com
MIT License
7.54k stars 1.1k forks source link

🔧 > Could not find method safeExtGet() for arguments [kotlinVersion, 1.8.10] on object of type org.gradle.api.internal.initialization.DefaultScriptHandler. #2730

Closed NicolasHubner closed 7 months ago

NicolasHubner commented 7 months ago

How were you trying to build the app?

I was trying to build the project on expo enviorment

Full build logs

Running 'gradlew :app:assembleRelease' in /home/expo/workingdir/build/android
Downloading https://services.gradle.org/distributions/gradle-8.3-all.zip
10%
20%.
30%.
40%.
50%.
60%.
70%.
80%.
90%.
100%
Welcome to Gradle 8.3!
Here are the highlights of this release:
- Faster Java compilation
 - Reduced memory usage
- Support for running on Java 20
For more details see https://docs.gradle.org/8.3/release-notes.html
To honour the JVM settings for this build a single-use Daemon process will be forked. For more on this, please refer to https://docs.gradle.org/8.3/userguide/gradle_daemon.html#sec:disabling_the_daemon in the Gradle documentation.
Daemon will be stopped at the end of the build
> Configure project :
Path for java installation '/usr/lib/jvm/openjdk-17' (Common Linux Locations) does not contain a java executable
> Task :expo-updates-gradle-plugin:pluginDescriptors
> Task :expo-updates-gradle-plugin:processResources
> Task :expo-dev-launcher-gradle-plugin:pluginDescriptors
> Task :expo-dev-launcher-gradle-plugin:processResources
> Task :gradle-plugin:pluginDescriptors
> Task :gradle-plugin:processResources
> Task :expo-dev-launcher-gradle-plugin:compileKotlin
> Task :expo-dev-launcher-gradle-plugin:compileJava
NO-SOURCE
> Task :expo-dev-launcher-gradle-plugin:classes
> Task :expo-dev-launcher-gradle-plugin:jar
> Task :expo-dev-launcher-gradle-plugin:inspectClassesForKotlinIC
> Task :gradle-plugin:compileKotlin
> Task :gradle-plugin:compileJava NO-SOURCE
> Task :gradle-plugin:classes
> Task :gradle-plugin:jar
> Task :gradle-plugin:inspectClassesForKotlinIC
> Task :expo-updates-gradle-plugin:compileKotlin
> Task :expo-updates-gradle-plugin:compileJava NO-SOURCE
> Task :expo-updates-gradle-plugin:classes
> Task :expo-updates-gradle-plugin:jar
> Task :expo-updates-gradle-plugin:inspectClassesForKotlinIC
> Configure project :app
 ℹ️  Applying gradle plugin 'expo-dev-launcher-gradle-plugin' (expo-dev-launcher@3.6.9)
ℹ️  Applying gradle plugin 'expo-updates-gradle-plugin' (expo-updates@0.24.12)
> Configure project :expo-modules-core
Checking the license for package NDK (Side by side) 25.1.8937393 in /home/expo/Android/Sdk/licenses
License for package NDK (Side by side) 25.1.8937393 accepted.
Preparing "Install NDK (Side by side) 25.1.8937393 v.25.1.8937393".
"Install NDK (Side by side) 25.1.8937393 v.25.1.8937393" ready.
Installing NDK (Side by side) 25.1.8937393 in /home/expo/Android/Sdk/ndk/25.1.8937393
"Install NDK (Side by side) 25.1.8937393 v.25.1.8937393" complete.
"Install NDK (Side by side) 25.1.8937393 v.25.1.8937393" finished.
Path for java installation '/usr/lib/jvm/openjdk-17' (Common Linux Locations) does not contain a java executable
> Configure project :expo
Using expo modules
  - expo-application (5.8.3)
  - expo-blur (12.9.2)
  - expo-camera (14.1.2)
  - expo-constants (15.4.5)
  - expo-dev-client (3.3.11)
  - expo-dev-launcher (3.6.9)
  - expo-dev-menu (4.5.8)
  - expo-document-picker (11.10.1)
  - expo-eas-client (0.11.2)
  - expo-file-system (16.0.8)
  - expo-font (11.10.3)
  - expo-image (1.10.6)
- expo-image-loader (4.6.0)
  - expo-image-manipulator (11.8.0)
  - expo-image-picker (14.7.1)
  - expo-json-utils (0.12.3)
  - expo-keep-awake (12.8.2)
  - expo-linear-gradient (12.7.2)
  - expo-location (16.5.5)
  - expo-manifests (0.13.2)
  - expo-modules-core (1.11.13)
  - expo-modules-core$android-annotation (1.11.13)
  - expo-modules-core$android-annotation-processor (1.11.13)
  - expo-network (5.8.0)
  - expo-notifications (0.27.6)
  - expo-splash-screen (0.26.4)
  - expo-structured-headers (3.7.2)
  - expo-system-ui (2.9.3)
  - expo-updates (0.24.12)
> Configure project :react-native-reanimated
Android gradle plugin: 8.1.1
Gradle: 8.3
> Configure project :react-native-vision-camera
[VisionCamera] react-native-worklets-core found, Frame Processors enabled!
FAILURE: Build failed with an exception.
* Where:
Build file '/home/expo/workingdir/build/node_modules/react-native-vision-camera-face-detector/android/build.gradle' line: 5
* What went wrong:
A problem occurred evaluating project ':react-native-vision-camera-face-detector'.
> Could not find method safeExtGet() for arguments [kotlinVersion, 1.8.10] on object of type org.gradle.api.internal.initialization.DefaultScriptHandler.
* 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.
> Get more help at https://help.gradle.org.
BUILD FAILED in 3m 46s
15 actionable tasks: 15 executed
Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.

Project dependencies

{
  "name": "mobile-pontua",
  "version": "1.0.0",
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "2": "SCRIPT TO EAS----------------------------",
    "3": "SCRIPT TO RELEASE APK LOCAL----------------------------",
    "start": "expo start --dev-client ",
    "start:cache": "expo start -c",
    "android:clean": "cd android && ./gradlew clean && cd .. && expo run:android",
    "android": "expo run:android",
    "ios": "expo run:ios",
    "lint": "yarn run typecheck && eslint src App.tsx",
    "lint:fix": "yarn run lint --fix",
    "typecheck": "tsc -b",
    "prebuild:clean": "npx expo prebuild --clean",
    "eas-build-development": "eas build --profile development",
    "eas-build-preview": "eas build --profile preview",
    "eas-build-preview-ios-simulator": "eas build --profile development-simulator --platform ios",
    "eas-build-production": "eas build --profile production",
    "eas-update-production": "eas update --branch production",
    "eas-update-preview": "eas update --branch preview",
    "eas-submit-ios": "eas submit --platform ios",
    "TESTAR": "----------------------------------------------------",
    "prebuild:release-bundle": "rm -rf ./android/app/src/main/res/drawable-*",
    "build:release-bundle": "cd android && ./gradlew clean && ./gradlew bundleRelease --stacktrace",
    "postbuild:release-bundle": "echo \"O arquivo está em ./android/app/build/outputs/bundle/release\"",
    "prebuild:release-apk": "rm -rf ./android/app/src/main/res/drawable-*",
    "build:release-apk": "cd android && ./gradlew clean && ./gradlew assembleRelease",
    "postbuild:release-apk": "echo \"O arquivo está em ./android/app/build/outputs/apk/release\""
  },
  "dependencies": {
    "@expo-google-fonts/inter": "^0.2.3",
    "@hookform/resolvers": "^3.3.4",
    "@react-native-community/netinfo": "11.1.0",
    "@react-navigation/drawer": "^6.6.14",
    "@react-navigation/native": "^6.1.9",
    "@react-navigation/native-stack": "^6.9.17",
    "@tanstack/react-query": "^5.18.1",
    "axios": "^1.6.7",
    "date-fns": "^3.3.1",
    "expo": "~50.0.5",
    "expo-blur": "~12.9.2",
    "expo-build-properties": "~0.11.1",
    "expo-camera": "~14.1.2",
    "expo-dev-client": "~3.3.9",
    "expo-document-picker": "~11.10.1",
    "expo-font": "~11.10.2",
    "expo-image": "~1.10.6",
    "expo-image-manipulator": "~11.8.0",
    "expo-image-picker": "~14.7.1",
    "expo-linear-gradient": "~12.7.2",
    "expo-location": "~16.5.3",
    "expo-network": "~5.8.0",
    "expo-notifications": "~0.27.6",
    "expo-splash-screen": "~0.26.4",
    "expo-status-bar": "~1.11.1",
    "expo-system-ui": "~2.9.3",
    "expo-updates": "~0.24.12",
    "lottie-react-native": "6.5.1",
    "react": "18.2.0",
    "react-hook-form": "^7.50.1",
    "react-native": "0.73.6",
    "react-native-gesture-handler": "~2.14.0",
    "react-native-maps": "1.10.0",
    "react-native-mask-input": "^1.2.3",
    "react-native-mmkv": "^2.11.0",
    "react-native-reanimated": "~3.6.2",
    "react-native-safe-area-context": "4.8.2",
    "react-native-screens": "~3.29.0",
    "react-native-size-matters": "^0.4.2",
    "react-native-svg": "14.1.0",
    "react-native-unistyles": "^2.2.0",
    "react-native-vision-camera": "3.9.1",
    "react-native-vision-camera-face-detector": "^1.3.5",
    "react-native-worklets-core": "^0.4.0",
    "zod": "^3.22.4",
    "zustand": "^4.5.0"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0",
    "@react-native-community/eslint-config": "^3.2.0",
    "@tanstack/eslint-plugin-query": "^5.18.1",
    "@types/react": "~18.2.45",
    "eslint": "^8.56.0",
    "eslint-config-universe": "^12.0.0",
    "eslint-plugin-prettier": "5.0.0",
    "eslint-plugin-unused-imports": "^3.1.0",
    "i18next": "^23.8.2",
    "prettier": "^3.2.5",
    "react-i18next": "^14.0.4",
    "typescript": "^5.1.3"
  },
  "private": true
}

VisionCamera Version

3.9.1

Target platforms

Android

Operating system

Linux

Can you build the VisionCamera Example app?

Yes, I can successfully build the Example app here

Additional information

mrousavy commented 7 months ago

react-native-vision-camera-face-detector

This is not VisionCamera, this is react-native-vision-camera-face-detector. You should probably create this bug report in their repo.