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

undefined reference to `facebook::react::AppSpec_ModuleProvider IN 0.70.6 ANDROID #35783

Closed
umeshcydv opened this issue Jan 5, 2023 · 3 comments
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)

Comments

@umeshcydv
Copy link

umeshcydv commented Jan 5, 2023

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 &params) {
// 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

Screenshot 2023-01-06 at 12 13 34 AM

@umeshcydv umeshcydv added Needs: Triage 🔍 Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules) labels Jan 5, 2023
@react-native-bot react-native-bot added the Platform: Android Android applications. label Jan 5, 2023
@cortinico
Copy link
Contributor

Configuration issue

What is the issue you're having?
Also please try on 0.71 as we removed all those C++ files from the user project so perhaps your problem is solved.

@github-actions
Copy link

This issue is waiting for author's feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days.

@github-actions github-actions bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Feb 13, 2023
@cortinico
Copy link
Contributor

Closing as this issue is fixed in 0.71 and the author is unresponsive

@facebook facebook locked as resolved and limited conversation to collaborators Feb 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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)
Projects
None yet
Development

No branches or pull requests

3 participants