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

[BUG]: ./gradlew clean - Cannot specify link libraries for target "react_codegen_RNTenTapViewSpec" #265

Open
duongnguyen17 opened this issue Jan 17, 2025 · 1 comment

Comments

@duongnguyen17
Copy link

./gradlew clean getting failed

Task :app:externalNativeBuildCleanDebug FAILED
Clean react_codegen_RNCWebViewSpec-armeabi-v7a, appmodules-armeabi-v7a, react_codegen_NitroModulesSpec-armeabi-v7a, react_codegen_RNTenTapViewSpec-armeabi-v7a
C/C++: -- GLOB mismatch!
C/C++: -- GLOB mismatch!
C/C++: CMake Error at /Users/datacom/Desktop/DTC/Example/android/app/build/generated/autolinking/src/main/jni/Android-autolinking.cmake:9 (add_subdirectory):
C/C++: add_subdirectory given source
C/C++: "/Users/datacom/Desktop/DTC/Example/node_modules/@10play/tentap-editor/android/build/generated/source/codegen/jni/"
C/C++: which is not an existing directory.
C/C++: Call Stack (most recent call first):
C/C++: /Users/datacom/Desktop/DTC/Example/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:100 (include)
C/C++: CMakeLists.txt:31 (include)
C/C++: CMake Error at /Users/datacom/Desktop/DTC/Example/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:103 (target_link_libraries):
C/C++: Cannot specify link libraries for target "react_codegen_RNTenTapViewSpec"
C/C++: which is not built by this project.
C/C++: Call Stack (most recent call first):
C/C++: CMakeLists.txt:31 (include)
C/C++: ninja: error: rebuilding 'build.ninja': subcommand failed

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:externalNativeBuildCleanDebug'.

com.android.ide.common.process.ProcessException: ninja: Entering directory `/Users/datacom/Desktop/DTC/Example/android/app/.cxx/Debug/6v6g1git/armeabi-v7a'
[0/2] Re-checking globbed directories...
[1/2] Re-running CMake...
-- Configuring incomplete, errors occurred!
See also "/Users/datacom/Desktop/DTC/Example/android/app/.cxx/Debug/6v6g1git/armeabi-v7a/CMakeFiles/CMakeOutput.log".
FAILED: build.ninja
/Users/datacom/Library/Android/sdk/cmake/3.22.1/bin/cmake --regenerate-during-build -S/Users/datacom/Desktop/DTC/Example/node_modules/react-native/ReactAndroid/cmake-utils/default-app-setup -B/Users/datacom/Desktop/DTC/Example/android/app/.cxx/Debug/6v6g1git/armeabi-v7a

C++ build system [clean] failed while executing:
/Users/datacom/Library/Android/sdk/cmake/3.22.1/bin/ninja
-C
/Users/datacom/Desktop/DTC/Example/android/app/.cxx/Debug/6v6g1git/armeabi-v7a
clean
from /Users/datacom/Desktop/DTC/Example/android/app
-- GLOB mismatch!
-- GLOB mismatch!
CMake Error at /Users/datacom/Desktop/DTC/Example/android/app/build/generated/autolinking/src/main/jni/Android-autolinking.cmake:9 (add_subdirectory):
add_subdirectory given source
"/Users/datacom/Desktop/DTC/Example/node_modules/@10play/tentap-editor/android/build/generated/source/codegen/jni/"
which is not an existing directory.
Call Stack (most recent call first):
/Users/datacom/Desktop/DTC/Example/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:100 (include)
CMakeLists.txt:31 (include)

CMake Error at /Users/datacom/Desktop/DTC/Example/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:103 (target_link_libraries):
Cannot specify link libraries for target "react_codegen_RNTenTapViewSpec"
which is not built by this project.
Call Stack (most recent call first):
CMakeLists.txt:31 (include)

ninja: error: rebuilding 'build.ninja': subcommand failed

  • 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 1s
15 actionable tasks: 5 executed, 10 up-to-date

@duongnguyen17 duongnguyen17 changed the title [BUG]: Cannot specify link libraries for target "react_codegen_RNTenTapViewSpec" [BUG]: ./gradlew clean - Cannot specify link libraries for target "react_codegen_RNTenTapViewSpec" Jan 17, 2025
@duongnguyen17
Copy link
Author

duongnguyen17 commented Jan 17, 2025

After some investigation, I discovered that when running the command ./gradlew clean, the system will clean each module in a specific order (determined by autolink). The react-native-webview module is cleaned first, followed by the tentap-editor. However, the issue is that when react-native-webview is cleaned, it also cleans tentap-editor, causing the error. My temporary solution is to ignore the tentap-editor module during the gradlew clean process and then manually clean tentap-editor.
The commands are as follows:
./gradlew clean -x 10play_tentap-editor:clean
./gradlew :10play_tentap-editor:clean

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

1 participant