Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android: New Arch #38

Open
patlux opened this issue Oct 2, 2024 · 3 comments
Open

Android: New Arch #38

patlux opened this issue Oct 2, 2024 · 3 comments

Comments

@patlux
Copy link

patlux commented Oct 2, 2024

It works fine on iOS, but on android I'm getting the following error

> Configure project :react-native-vision-camera
[VisionCamera] Thank you for using VisionCamera ❤️
[VisionCamera] If you enjoy using VisionCamera, please consider sponsoring this project: https://github.com/sponsors/mrousavy
[VisionCamera] node_modules found at /Users/.../node_modules
[VisionCamera] VisionCamera_enableFrameProcessors is set to true!
[VisionCamera] react-native-worklets-core found, Frame Processors are enabled!
[VisionCamera] VisionCamera_enableCodeScanner is set to false!
WARNING: The specified Android SDK Build Tools version (23.0.1) is ignored, as it is below the minimum supported version (34.0.0) for Android Gradle Plugin 8.5.0.
Android SDK Build Tools 34.0.0 will be used.
To suppress this warning, remove "buildToolsVersion '23.0.1'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.

> Task :mgcrea_vision-camera-barcode-scanner:generateCodegenSchemaFromJavaScript FAILED
node:fs:1640
  const stats = binding.lstat(
                        ^

Error: ENOENT: no such file or directory, lstat '/Users/patwoz/dev/.../node_modules/@mgcrea/vision-camera-barcode-scanner/src'
    at Object.lstatSync (node:fs:1640:25)
    at /Users/patwoz/dev/.../node_modules/@react-native/codegen/lib/cli/combine/combine-js-to-schema.js:108:15
    at Array.flatMap (<anonymous>)
    at expandDirectoriesIntoFiles (/Users/patwoz/dev/.../node_modules/@react-native/codegen/lib/cli/combine/combine-js-to-schema.js:107:6)
    at combineSchemasInFileList (/Users/patwoz/dev/.../node_modules/@react-native/codegen/lib/cli/combine/combine-js-to-schema.js:123:28)
    at combineSchemasInFileListAndWriteToFile (/Users/patwoz/dev/.../node_modules/@react-native/codegen/lib/cli/combine/combine-js-to-schema.js:142:20)
    at Object.<anonymous> (/Users/patwoz/dev/.../node_modules/@react-native/codegen/lib/cli/combine/combine-js-to-schema-cli.js:76:1)
    at Module._compile (node:internal/modules/cjs/loader:1469:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Module.load (node:internal/modules/cjs/loader:1288:32) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'lstat',
  path: '/Users/patwoz/dev/.../node_modules/@mgcrea/vision-camera-barcode-scanner/src'
}

Node.js v20.17.0

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':mgcrea_vision-camera-barcode-scanner:generateCodegenSchemaFromJavaScript'.
> Process 'command 'node'' finished with non-zero exit value 1

Any idea?

@patlux
Copy link
Author

patlux commented Oct 2, 2024

Ok I just copied node_modules/@mgcrea/vision-camera-barcode-scanner/dist to node_modules/@mgcrea/vision-camera-barcode-scanner/src and it works fine on android.

So either the package must ship the src folder or it must be configured to dist somehow.

@PepeTonin
Copy link

Ok I just copied node_modules/@mgcrea/vision-camera-barcode-scanner/dist to node_modules/@mgcrea/vision-camera-barcode-scanner/src and it works fine on android.

So either the package must ship the src folder or it must be configured to dist somehow.

Worked for me. Thank you!

@lauaall
Copy link

lauaall commented Mar 9, 2025

Not working in 0.76

Git branch has uncommited file changes
› It's recommended to commit all changes before proceeding in case you want to revert generated changes.

√ Continue with uncommited changes? ... yes

√ Cleared android code
√ Created native directory
√ Updated package.json | no changes
√ Finished prebuild
PS D:\aleks\Code\solaride-chip-scanner> npx expo run:android
› Building app...
Configuration on demand is an incubating feature.

Configure project :expo

Using expo modules

  • expo-asset (11.0.4)
  • expo-av (15.0.2)
  • expo-barcode-scanner (13.0.1)
  • expo-blur (14.0.3)
  • expo-camera (16.0.17)
  • expo-constants (17.0.7)
  • expo-document-picker (13.0.3)
  • expo-file-system (18.0.11)
  • expo-font (13.0.4)
  • expo-haptics (14.0.1)
  • expo-image-loader (5.0.0)
  • expo-image-manipulator (13.0.6)
  • expo-keep-awake (14.0.3)
  • expo-linking (7.0.5)
  • expo-modules-core (2.2.2)
  • expo-sharing (13.0.1)
  • expo-splash-screen (0.29.22)
  • expo-system-ui (4.0.8)
  • expo-web-browser (14.0.2)

Configure project :react-native-reanimated
Android gradle plugin: 8.6.0
Gradle: 8.10.2

Configure project :react-native-vision-camera
[VisionCamera] Thank you for using VisionCamera ??
[VisionCamera] If you enjoy using VisionCamera, please consider sponsoring this project: https://github.com/sponsors/mrousavy
[VisionCamera] node_modules found at D:\aleks\Code\solaride-chip-scanner\node_modules
[VisionCamera] VisionCamera_enableFrameProcessors is set to true!
[VisionCamera] react-native-worklets-core found, Frame Processors are enabled!
[VisionCamera] VisionCamera_enableCodeScanner is set to false!

Task :mgcrea_vision-camera-barcode-scanner:generateCodegenSchemaFromJavaScript FAILED
node:internal/fs/utils:350
throw err;
^

Error: ENOENT: no such file or directory, lstat '..\src'
at Object.lstatSync (node:fs:1668:3)
at D:\aleks\Code\solaride-chip-scanner\node_modules@react-native\codegen\lib\cli\combine\combine-js-to-schema.js:108:15
at Array.flatMap ()
at expandDirectoriesIntoFiles (D:\aleks\Code\solaride-chip-scanner\node_modules@react-native\codegen\lib\cli\combine\combine-js-to-schema.js:107:6)
at combineSchemasInFileList (D:\aleks\Code\solaride-chip-scanner\node_modules@react-native\codegen\lib\cli\combine\combine-js-to-schema.js:123:28)
at combineSchemasInFileListAndWriteToFile (D:\aleks\Code\solaride-chip-scanner\node_modules@react-native\codegen\lib\cli\combine\combine-js-to-schema.js:142:20)
at Object. (D:\aleks\Code\solaride-chip-scanner\node_modules@react-native\codegen\lib\cli\combine\combine-js-to-schema-cli.js:76:1)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32) {
errno: -4058,
syscall: 'lstat',
code: 'ENOENT',
path: '..\src'
}

Node.js v18.18.0

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':mgcrea_vision-camera-barcode-scanner:generateCodegenSchemaFromJavaScript'.

Process 'command 'cmd'' finished with non-zero exit value 1

  • 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 14s
40 actionable tasks: 29 executed, 1 from cache, 10 up-to-date
Error: D:\aleks\Code\solaride-chip-scanner\android\gradlew.bat app:assembleDebug -x lint -x test --configure-on-demand --build-cache -PreactNativeDevServerPort=8081 -PreactNativeArchitectures=arm64-v8a,armeabi-v7a exited with non-zero code: 1
Error: D:\aleks\Code\solaride-chip-scanner\android\gradlew.bat app:assembleDebug -x lint -x test --configure-on-demand --build-cache -PreactNativeDevServerPort=8081 -PreactNativeArchitectures=arm64-v8a,armeabi-v7a exited with non-zero code: 1
at ChildProcess.completionListener (D:\aleks\Code\solaride-chip-scanner\node_modules@expo\spawn-async\src\spawnAsync.ts:67:13)
at Object.onceWrapper (node:events:632:26)
at ChildProcess.emit (node:events:517:28)
at ChildProcess.cp.emit (D:\aleks\Code\solaride-chip-scanner\node_modules\cross-spawn\lib\enoent.js:34:29)
at maybeClose (node:internal/child_process:1098:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:303:5)
...
at spawnAsync (D:\aleks\Code\solaride-chip-scanner\node_modules@expo\spawn-async\src\spawnAsync.ts:28:21)
at spawnGradleAsync (D:\aleks\Code\solaride-chip-scanner\node_modules@expo\cli\src\start\platforms\android\gradle.ts:134:28)
at assembleAsync (D:\aleks\Code\solaride-chip-scanner\node_modules@expo\cli\src\start\platforms\android\gradle.ts:83:16)
at runAndroidAsync (D:\aleks\Code\solaride-chip-scanner\node_modules@expo\cli\src\run\android\runAndroidAsync.ts:48:24)
PS D:\aleks\Code\solaride-chip-scanner>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants