undefined reference to `facebook::react::AppSpec_ModuleProvider IN 0.70.6 ANDROID #35783
Labels
Needs: Author Feedback
Platform: Android
Android applications.
Stale
There has been a lack of activity on this issue and it may be closed soon.
Type: New Architecture
Issues and PRs related to new architecture (Fabric/Turbo Modules)
Description
CMakeLists.txt
`cmake_minimum_required(VERSION 3.13)
project(plobalapps_appmodules)
include(${REACT_ANDROID_DIR}/cmake-utils/ReactNative-application.cmake)`
MainApplicationModuleProvider.cpp
`#include "MainApplicationModuleProvider.h"
#include <rncli.h>
#include <rncore.h>
#include <AppSpec.h>
namespace facebook {
namespace react {
std::shared_ptr MainApplicationModuleProvider(
const std::string &moduleName,
const JavaTurboModule::InitParams ¶ms) {
// Here you can provide your own module provider for TurboModules coming from
// either your application or from external libraries. The approach to follow
// is similar to the following (for a library called
samplelibrary
://
auto module = AppSpec_ModuleProvider(moduleName, params);
if (module != nullptr) {
return module;
}
//return rncore_ModuleProvider(moduleName, params);
// Module providers autolinked by RN CLI
auto rncli_module = rncli_ModuleProvider(moduleName, params);
if (rncli_module != nullptr) {
return rncli_module;
}
return rncore_ModuleProvider(moduleName, params);
}
} // namespace react
} // namespace facebook`
Not able include #include <AppSpec.h>, Codegen is working fine and I am able to locate AppSpec.h file in build/generated/source/codegen/jni
Version
0.70.6
Output of
npx react-native info
System:
OS: macOS 13.0.1
CPU: (10) arm64 Apple M1 Pro
Memory: 282.55 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 19.1.0 - /opt/homebrew/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 8.19.3 - /opt/homebrew/bin/npm
Watchman: Not Found
Managers:
CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
Android SDK:
Android NDK: 22.1.7171670
IDEs:
Android Studio: 2021.2 AI-212.5712.43.2112.8609683
Xcode: 14.2/14C18 - /usr/bin/xcodebuild
Languages:
Java: 18.0.2.1 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.1.0 => 18.1.0
react-native: 0.70.6 => 0.70.6
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
Configuration issue
Snack, code example, screenshot, or link to a repository
The text was updated successfully, but these errors were encountered: