Skip to content

πŸ› > Task :react-native-vision-camera:compileDebugKotlin FAILEDΒ #3602

@as169m

Description

@as169m

What's happening?

Execution failed for task ':react-native-vision-camera:compileDebugKotlin'.

Reproduceable Code

unable to build only

Relevant log output

PS D:\Projects\> npx react-native run-android
* daemon not running; starting now at tcp:5037
* daemon started successfully
info Launching emulator...
error Failed to launch emulator. Reason: It took too long to start and connect with Android emulator: Pixel_7. You can try starting the emulator manually from the terminal with: D:\Android\Sdk/emulator/emulator @Pixel_7.
warn Please launch an emulator manually or connect a device. Otherwise app may fail to launch.
info Installing the app...
Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details

> 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:\Projects\\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 :react-native-worklets-core:buildCMakeDebug[arm64-v8a]	\\
C/C++: Hard link from 'C:\Users\ashok\.gradle\caches\8.14.3\transforms\eb6d09c91acf843499bdca80e0a66fd6\transformed\react-android-0.81.0-debug\prefab\modules\reactnative\libs\android.arm64-v8a\libreactnative.so' to 'D:\Projects\\node_modules\react-native-worklets-core\android\build\intermediates\cxx\Debug\033436h6\obj\arm64-v8a\libreactnative.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\ashok\.gradle\caches\8.14.3\transforms\eb6d09c91acf843499bdca80e0a66fd6\transformed\react-android-0.81.0-debug\prefab\modules\reactnative\libs\android.arm64-v8a\libreactnative.so' to 'D:\Projects\\node_modules\react-native-worklets-core\android\build\intermediates\cxx\Debug\033436h6\obj\arm64-v8a\libreactnative.so' failed. Doing a slower copy instead.

> Task :react-native-worklets-core:buildCMakeDebug[armeabi-v7a]
C/C++: ninja: Entering directory `D:\Projects\\node_modules\react-native-worklets-core\android\.cxx\Debug\033436h6\armeabi-v7a'
C/C++: In file included from D:/Projects/node_modules/react-native-worklets-core/android/cpp-adapter.cpp:6:
C/C++: In file included from D:/Projects/node_modules/react-native-worklets-core/android/../cpp/WKTJsiWorkletApi.h:14:
C/C++: In file included from D:/Projects/node_modules/react-native-worklets-core/android/../cpp/sharedvalues/WKTJsiSharedValue.h:8:
C/C++: D:/Projects/node_modules/react-native-worklets-core/android/../cpp/WKTJsiDispatcher.h:97:22: warning: exception of type 'const std::runtime_error &' will be caught by earlier handler [-Wexceptions]
C/C++:    97 |       } catch (const std::runtime_error &err) {
C/C++:       |                      ^
C/C++: D:/Projects/node_modules/react-native-worklets-core/android/../cpp/WKTJsiDispatcher.h:94:22: note: for type 'const std::exception &'
C/C++:    94 |       } catch (const std::exception &err) {
C/C++:       |                      ^
C/C++: 1 warning generated.
C/C++: In file included from D:/Projects/node_modules/react-native-worklets-core/cpp/WKTJsiWorkletApi.cpp:1:
C/C++: In file included from D:/Projects/node_modules/react-native-worklets-core/cpp/WKTJsiWorkletApi.h:14:
C/C++: In file included from D:/Projects/node_modules/react-native-worklets-core/android/../cpp/sharedvalues/WKTJsiSharedValue.h:8:
C/C++: D:/Projects/node_modules/react-native-worklets-core/android/../cpp/WKTJsiDispatcher.h:97:22: warning: exception of type 'const std::runtime_error &' will be caught by earlier handler [-Wexceptions]
C/C++:    97 |       } catch (const std::runtime_error &err) {
C/C++:       |                      ^
C/C++: D:/Projects/node_modules/react-native-worklets-core/android/../cpp/WKTJsiDispatcher.h:94:22: note: for type 'const std::exception &'
C/C++:    94 |       } catch (const std::exception &err) {
C/C++:       |                      ^
C/C++: 1 warning generated.

> Task :react-native-vision-camera:compileDebugKotlin FAILED

> Task :react-native-worklets-core:buildCMakeDebug[armeabi-v7a]
C/C++: In file included from D:/Projects/node_modules/react-native-worklets-core/cpp/WKTJsiWorkletContext.cpp:3:
C/C++: In file included from D:/Projects/node_modules/react-native-worklets-core/cpp/WKTJsiWorkletApi.h:14:
C/C++: In file included from D:/Projects/node_modules/react-native-worklets-core/android/../cpp/sharedvalues/WKTJsiSharedValue.h:8:
C/C++: D:/Projects/node_modules/react-native-worklets-core/android/../cpp/WKTJsiDispatcher.h:97:22: warning: exception of type 'const std::runtime_error &' will be caught by earlier handler [-Wexceptions]
C/C++:    97 |       } catch (const std::runtime_error &err) {
C/C++:       |                      ^
C/C++: D:/Projects/node_modules/react-native-worklets-core/android/../cpp/WKTJsiDispatcher.h:94:22: note: for type 'const std::exception &'
C/C++:    94 |       } catch (const std::exception &err) {
C/C++:       |                      ^
C/C++: In file included from D:/Projects/node_modules/react-native-worklets-core/cpp/WKTJsiWorkletContext.cpp:15:
C/C++: D:/Projects/node_modules/react-native-worklets-core/android/../cpp/decorators/WKTJsiSetImmediateDecorator.h:85:53: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat]
C/C++:    85 |                   printf("ctx %lu: setImmediate\n", context->getContextId());
C/C++:       |                               ~~~                   ^~~~~~~~~~~~~~~~~~~~~~~
C/C++:       |                               %zu
C/C++: 2 warnings generated.
C/C++: Hard link from 'C:\Users\ashok\.gradle\caches\8.14.3\transforms\eb6d09c91acf843499bdca80e0a66fd6\transformed\react-android-0.81.0-debug\prefab\modules\reactnative\libs\android.armeabi-v7a\libreactnative.so' to 'D:\Projects\\node_modules\react-native-worklets-core\android\build\intermediates\cxx\Debug\033436h6\obj\armeabi-v7a\libreactnative.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\ashok\.gradle\caches\8.14.3\transforms\eb6d09c91acf843499bdca80e0a66fd6\transformed\react-android-0.81.0-debug\prefab\modules\reactnative\libs\android.armeabi-v7a\libreactnative.so' to 'D:\Projects\\node_modules\react-native-worklets-core\android\build\intermediates\cxx\Debug\033436h6\obj\armeabi-v7a\libreactnative.so' failed. Doing a slower copy instead.

[Incubating] Problems report is available at: file:///D:/Projects/android/build/reports/problems/problems-report.html

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.14.3/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
128 actionable tasks: 10 executed, 118 up-to-date

info πŸ’‘ Tip: Make sure that you have set up your development environment correctly, by running npx react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor 

e: file:///D:/Projects/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/react/CameraViewManager.kt:31:5 Return type mismatch: expected 'MutableMap<String, Any>?', actual 'Map<String, Any>'.
e: file:///D:/Projects/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/react/CameraViewModule.kt:192:20 Unresolved reference 'currentActivity'.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-vision-camera:compileDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
   > Compilation error. See log for more 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.
> Get more help at https://help.gradle.org.

BUILD FAILED in 4m 42s
error Failed to install the app. Command failed with exit code 1: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
e: file:///D:/Projects/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/react/CameraViewManager.kt:31:5 Return type mismatch: expected 'MutableMap<String, Any>?', actual 'Map<String, Any>'. e: file:///D:/Projects/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/react/CameraViewModule.kt:192:20 Unresolved reference 'currentActivity'. FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':react-native-vision-camera:compileDebugKotlin'. > A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction > Compilation error. See log for more 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. > Get more help at https://help.gradle.org. BUILD FAILED in 4m 42s.
info Run CLI with --verbose flag for more details.
PS D:\Projects\> npx react-native run-android
info Installing the app...

> 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:\Projects\\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 :react-native-worklets-core:buildCMakeDebug[arm64-v8a]
C/C++: Hard link from 'C:\Users\ashok\.gradle\caches\8.14.3\transforms\eb6d09c91acf843499bdca80e0a66fd6\transformed\react-android-0.81.0-debug\prefab\modules\reactnative\libs\android.arm64-v8a\libreactnative.so' to 'D:\Projects\\node_modules\react-native-worklets-core\android\build\intermediates\cxx\Debug\033436h6\obj\arm64-v8a\libreactnative.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\ashok\.gradle\caches\8.14.3\transforms\eb6d09c91acf843499bdca80e0a66fd6\transformed\react-android-0.81.0-debug\prefab\modules\reactnative\libs\android.arm64-v8a\libreactnative.so' to 'D:\Projects\\node_modules\react-native-worklets-core\android\build\intermediates\cxx\Debug\033436h6\obj\arm64-v8a\libreactnative.so' failed. Doing a slower copy instead.

> Task :react-native-vision-camera:compileDebugKotlin FAILED

[Incubating] Problems report is available at: file:///D:/Projects/android/build/reports/problems/problems-report.html

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.14.3/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
126 actionable tasks: 3 executed, 123 up-to-date

info πŸ’‘ Tip: Make sure that you have set up your development environment correctly, by running npx react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor 

e: file:///D:/Projects/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/react/CameraViewManager.kt:31:5 Return type mismatch: expected 'MutableMap<String, Any>?', actual 'Map<String, Any>'.
e: file:///D:/Projects/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/react/CameraViewModule.kt:192:20 Unresolved reference 'currentActivity'.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-vision-camera:compileDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
   > Compilation error. See log for more 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.
> Get more help at https://help.gradle.org.

BUILD FAILED in 2m 25s
error Failed to install the app. Command failed with exit code 1: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
e: file:///D:/Projects/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/react/CameraViewManager.kt:31:5 Return type mismatch: expected 'MutableMap<String, Any>?', actual 'Map<String, Any>'. e: file:///D:/Projects/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/react/CameraViewModule.kt:192:20 Unresolved reference 'currentActivity'. FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':react-native-vision-camera:compileDebugKotlin'. > A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction > Compilation error. See log for more 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. > Get more help at https://help.gradle.org. BUILD FAILED in 2m 25s.
info Run CLI with --verbose flag for more details.
PS D:\Projects\>

Camera Device

no output since its not even running

Device

pixel virtual device

VisionCamera Version

4.7.1

Can you reproduce this issue in the VisionCamera Example app?

I didn't try (⚠️ your issue might get ignored & closed if you don't try this)

Additional information

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions