Closed YudaAdiPratama closed 5 days ago
Hey! 👋
The issue doesn't seem to contain a minimal reproduction.
Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?
same issue here
same issue here
same issue
same issue.
i edited react-native-reanimated\Common\cpp\reanimated\NativeModules\NativeReanimatedModule.cpp and fixed few decrepcated error messages and now it's working fine for me.
Windows 11. React Native 0.75.2
Here is complete file;
using namespace facebook;
// Android can't find the definition of this static field bool CoreFeatures::useNativeState;
namespace reanimated {
NativeReanimatedModule::NativeReanimatedModule(
jsi::Runtime &rnRuntime,
const std::shared_ptr
synchronouslyUpdateUIPropsFunction_(
platformDepMethodsHolder.synchronouslyUpdateUIPropsFunction),
propsRegistry_(std::make_shared<PropsRegistry>()),
obtainPropFunction_(platformDepMethodsHolder.obtainPropFunction),
configurePropsPlatformFunction_(
platformDepMethodsHolder.configurePropsFunction),
updatePropsFunction_(platformDepMethodsHolder.updatePropsFunction),
subscribeForKeyboardEventsFunction_(
platformDepMethodsHolder.subscribeForKeyboardEvents),
unsubscribeFromKeyboardEventsFunction_(
platformDepMethodsHolder.unsubscribeFromKeyboardEvents) {
commonInit(platformDepMethodsHolder); }
void NativeReanimatedModule::commonInit( const PlatformDepMethodsHolder &platformDepMethodsHolder) { auto requestAnimationFrame = [this](jsi::Runtime &rt, const jsi::Value &callback) { this->requestAnimationFrame(rt, callback); };
auto updateProps = [this](jsi::Runtime &rt, const jsi::Value &operations) { this->updateProps(rt, operations); };
auto removeFromPropsRegistry = [this](jsi::Runtime &rt, const jsi::Value &viewTags) { this->removeFromPropsRegistry(rt, viewTags); };
auto measure = [this](jsi::Runtime &rt, const jsi::Value &shadowNodeValue) { return this->measure(rt, shadowNodeValue); };
auto dispatchCommand = [this]( jsi::Runtime &rt, const jsi::Value &shadowNodeValue, const jsi::Value &commandNameValue, const jsi::Value &argsValue) { this->dispatchCommand(rt, shadowNodeValue, commandNameValue, argsValue); }; ProgressLayoutAnimationFunction progressLayoutAnimation = [this](jsi::Runtime &rt, int tag, const jsi::Object &newStyle, bool) { auto surfaceId = layoutAnimationsProxy->progressLayoutAnimation(tag, newStyle); if (!surfaceId) { return; } uiManager->getShadowTreeRegistry().visit( *surfaceId, [](const ShadowTree &shadowTree) { shadowTree.notifyDelegatesOfUpdates(); }); };
EndLayoutAnimationFunction endLayoutAnimation = [this](int tag, bool shouldRemove) { auto surfaceId = layoutAnimationsProxy_->endLayoutAnimation(tag, shouldRemove); if (!surfaceId) { return; }
uiManager_->getShadowTreeRegistry().visit(
*surfaceId, [](const ShadowTree &shadowTree) {
shadowTree.notifyDelegatesOfUpdates();
});
};
auto obtainProp = [this]( jsi::Runtime &rt, const jsi::Value &shadowNodeWrapper, const jsi::Value &propName) { return this->obtainProp(rt, shadowNodeWrapper, propName); };
jsi::Runtime &uiRuntime = uiWorkletRuntime_->getJSIRuntime(); UIRuntimeDecorator::decorate( uiRuntime,
removeFromPropsRegistry,
obtainProp,
updateProps,
measure,
dispatchCommand,
platformDepMethodsHolder.scrollToFunction,
platformDepMethodsHolder.obtainPropFunction,
platformDepMethodsHolder.updatePropsFunction,
platformDepMethodsHolder.measureFunction,
platformDepMethodsHolder.dispatchCommandFunction,
requestAnimationFrame,
platformDepMethodsHolder.getAnimationTimestamp,
platformDepMethodsHolder.setGestureStateFunction,
progressLayoutAnimation,
endLayoutAnimation,
platformDepMethodsHolder.progressLayoutAnimation,
platformDepMethodsHolder.endLayoutAnimation,
platformDepMethodsHolder.maybeFlushUIUpdatesQueueFunction);
}
NativeReanimatedModule::~NativeReanimatedModule() { // event handler registry and frame callbacks store some JSI values from UI // runtime, so they have to go away before we tear down the runtime eventHandlerRegistry.reset(); frameCallbacks.clear(); uiWorkletRuntime_.reset(); }
void NativeReanimatedModule::scheduleOnUI(
jsi::Runtime &rt,
const jsi::Value &worklet) {
auto shareableWorklet = extractShareableOrThrow
// JSI's scope defined here allows for JSI-objects to be cleared up after
// each runtime loop. Within these loops we typically create some temporary
// JSI objects and hence it allows for such objects to be garbage collected
// much sooner.
// Apparently the scope API is only supported on Hermes at the moment.
const auto scope = jsi::Scope(uiWorkletRuntime_->getJSIRuntime());
uiWorkletRuntime_->runGuarded(shareableWorklet);
}); }
jsi::Value NativeReanimatedModule::executeOnUIRuntimeSync( jsi::Runtime &rt, const jsi::Value &worklet) { return uiWorkletRuntime_->executeSync(rt, worklet); }
jsi::Value NativeReanimatedModule::createWorkletRuntime(
jsi::Runtime &rt,
const jsi::Value &name,
const jsi::Value &initializer) {
auto workletRuntime = std::makeshared
jsi::Value NativeReanimatedModule::scheduleOnRuntime( jsi::Runtime &rt, const jsi::Value &workletRuntimeValue, const jsi::Value &shareableWorkletValue) { reanimated::scheduleOnRuntime(rt, workletRuntimeValue, shareableWorkletValue); return jsi::Value::undefined(); }
jsi::Value NativeReanimatedModule::makeShareableClone( jsi::Runtime &rt, const jsi::Value &value, const jsi::Value &shouldRetainRemote, const jsi::Value &nativeStateSource) { return reanimated::makeShareableClone( rt, value, shouldRetainRemote, nativeStateSource); }
jsi::Value NativeReanimatedModule::registerEventHandler( jsi::Runtime &rt, const jsi::Value &worklet, const jsi::Value &eventName, const jsi::Value &emitterReactTag) { static uint64_t NEXT_EVENT_HANDLER_ID = 1;
uint64_t newRegistrationId = NEXT_EVENT_HANDLER_ID++;
auto eventNameStr = eventName.asString(rt).utf8(rt);
auto handlerShareable = extractShareableOrThrow
uiScheduler_->scheduleOnUI([=,this] {
auto handler = std::makeshared
return jsi::Value(static_cast
void NativeReanimatedModule::unregisterEventHandler( jsi::Runtime &, const jsi::Value ®istrationId) { uint64t id = registrationId.asNumber(); uiScheduler->scheduleOnUI( [=,this] { eventHandlerRegistry_->unregisterEventHandler(id); }); }
static inline std::string intColorToHex(const int val) { std::stringstream invertedHexColorStream; // By default transparency is first, color second invertedHexColorStream << std::setfill('0') << std::setw(8) << std::hex << val;
auto invertedHexColor = invertedHexColorStream.str(); auto hexColor = "#" + invertedHexColor.substr(2, 6) + invertedHexColor.substr(0, 2);
return hexColor; }
std::string NativeReanimatedModule::obtainPropFromShadowNode( jsi::Runtime &rt, const std::string &propName, const ShadowNode::Shared &shadowNode) { auto newestCloneOfShadowNode = uiManager_->getNewestCloneOfShadowNode(*shadowNode);
if (propName == "width" || propName == "height" || propName == "top" || propName == "left") { // These props are calculated from frame auto layoutableShadowNode = dynamiccast<LayoutableShadowNode const *>( newestCloneOfShadowNode.get()); const auto &frame = layoutableShadowNode->layoutMetrics.frame;
if (propName == "width") {
return std::to_string(frame.size.width);
} else if (propName == "height") {
return std::to_string(frame.size.height);
} else if (propName == "top") {
return std::to_string(frame.origin.y);
} else if (propName == "left") {
return std::to_string(frame.origin.x);
}
} else {
// These props are calculated from viewProps
auto props = newestCloneOfShadowNode->getProps();
auto viewProps = std::static_pointer_cast
throw std::runtime_error(std::string(
"Getting property " + propName + "
with function getViewProp
is not supported"));
}
jsi::Value NativeReanimatedModule::getViewProp(
jsi::Runtime &rnRuntime,
const jsi::Value &shadowNodeWrapper,
const jsi::Value &propName,
const jsi::Value &callback) {
const auto propNameStr = propName.asString(rnRuntime).utf8(rnRuntime);
const auto funPtr = std::makeshared
jsScheduler_->scheduleOnJS([=](jsi::Runtime &rnRuntime) {
const auto resultValue =
jsi::String::createFromUtf8(rnRuntime, resultStr);
funPtr->call(rnRuntime, resultValue);
});
}); return jsi::Value::undefined(); }
jsi::Value NativeReanimatedModule::getViewProp(
jsi::Runtime &rnRuntime,
const jsi::Value &viewTag,
const jsi::Value &propName,
const jsi::Value &callback) {
const auto propNameStr = propName.asString(rnRuntime).utf8(rnRuntime);
const auto funPtr = std::make_shared
const int viewTagInt = viewTag.asNumber();
uiScheduler->scheduleOnUI([=,this]() { jsi::Runtime &uiRuntime = uiWorkletRuntime->getJSIRuntime(); const jsi::Value propNameValue = jsi::String::createFromUtf8(uiRuntime, propNameStr); const auto resultValue = obtainPropFunction_(uiRuntime, viewTagInt, propNameValue); const auto resultStr = resultValue.asString(uiRuntime).utf8(uiRuntime);
jsScheduler_->scheduleOnJS([=](jsi::Runtime &rnRuntime) {
const auto resultValue =
jsi::String::createFromUtf8(rnRuntime, resultStr);
funPtr->call(rnRuntime, resultValue);
});
}); return jsi::Value::undefined(); }
jsi::Value NativeReanimatedModule::enableLayoutAnimations( jsi::Runtime &, const jsi::Value &config) { FeaturesConfig::setLayoutAnimationEnabled(config.getBool()); return jsi::Value::undefined(); }
jsi::Value NativeReanimatedModule::configureProps( jsi::Runtime &rt, const jsi::Value &uiProps, const jsi::Value &nativeProps) {
auto uiPropsArray = uiProps.asObject(rt).asArray(rt); for (sizet i = 0; i < uiPropsArray.size(rt); ++i) { auto name = uiPropsArray.getValueAtIndex(rt, i).asString(rt).utf8(rt); animatablePropNames.insert(name); } auto nativePropsArray = nativeProps.asObject(rt).asArray(rt); for (sizet i = 0; i < nativePropsArray.size(rt); ++i) { auto name = nativePropsArray.getValueAtIndex(rt, i).asString(rt).utf8(rt); nativePropNames.insert(name); animatablePropNames_.insert(name); }
configurePropsPlatformFunction_(rt, uiProps, nativeProps);
return jsi::Value::undefined(); }
jsi::Value NativeReanimatedModule::configureLayoutAnimationBatch(
jsi::Runtime &rt,
const jsi::Value &layoutAnimationsBatch) {
auto array = layoutAnimationsBatch.asObject(rt).asArray(rt);
size_t length = array.size(rt);
std::vector
void NativeReanimatedModule::setShouldAnimateExiting( jsi::Runtime &rt, const jsi::Value &viewTag, const jsi::Value &shouldAnimate) { layoutAnimationsManager_->setShouldAnimateExiting( viewTag.asNumber(), shouldAnimate.getBool()); }
bool NativeReanimatedModule::isAnyHandlerWaitingForEvent( const std::string &eventName, const int emitterReactTag) { return eventHandlerRegistry_->isAnyHandlerWaitingForEvent( eventName, emitterReactTag); }
void NativeReanimatedModule::requestAnimationFrame(
jsi::Runtime &rt,
const jsi::Value &callback) {
frameCallbacks_.push_back(std::make_shared
void NativeReanimatedModule::maybeRequestRender() { if (!renderRequested) { renderRequested = true; jsi::Runtime &uiRuntime = uiWorkletRuntime->getJSIRuntime(); requestRender(onRenderCallback_, uiRuntime); } }
void NativeReanimatedModule::onRender(double timestampMs) { auto callbacks = std::move(frameCallbacks); frameCallbacks.clear(); jsi::Runtime &uiRuntime = uiWorkletRuntime_->getJSIRuntime(); jsi::Value timestamp{timestampMs}; for (const auto &callback : callbacks) { runOnRuntimeGuarded(uiRuntime, *callback, timestamp); } }
jsi::Value NativeReanimatedModule::registerSensor( jsi::Runtime &rt, const jsi::Value &sensorType, const jsi::Value &interval, const jsi::Value &iosReferenceFrame, const jsi::Value &sensorDataHandler) { return animatedSensorModule.registerSensor( rt, uiWorkletRuntime, sensorType, interval, iosReferenceFrame, sensorDataHandler); }
void NativeReanimatedModule::unregisterSensor( jsi::Runtime &, const jsi::Value &sensorId) { animatedSensorModule_.unregisterSensor(sensorId); }
void NativeReanimatedModule::cleanupSensors() { animatedSensorModule_.unregisterAllSensors(); }
bool NativeReanimatedModule::isThereAnyLayoutProp( jsi::Runtime &rt, const jsi::Object &props) { const jsi::Array propNames = props.getPropertyNames(rt); for (sizet i = 0; i < propNames.size(rt); ++i) { const std::string propName = propNames.getValueAtIndex(rt, i).asString(rt).utf8(rt); bool isLayoutProp = nativePropNames.find(propName) != nativePropNames_.end(); if (isLayoutProp) { return true; } } return false; }
jsi::Value NativeReanimatedModule::filterNonAnimatableProps( jsi::Runtime &rt, const jsi::Value &props) { jsi::Object nonAnimatableProps(rt); bool hasAnyNonAnimatableProp = false; const jsi::Object &propsObject = props.asObject(rt); const jsi::Array &propNames = propsObject.getPropertyNames(rt); for (sizet i = 0; i < propNames.size(rt); ++i) { const std::string &propName = propNames.getValueAtIndex(rt, i).asString(rt).utf8(rt); if (!collection::contains(animatablePropNames, propName)) { hasAnyNonAnimatableProp = true; const auto &propNameStr = propName.c_str(); const jsi::Value &propValue = propsObject.getProperty(rt, propNameStr); nonAnimatableProps.setProperty(rt, propNameStr, propValue); } } if (!hasAnyNonAnimatableProp) { return jsi::Value::undefined(); } return nonAnimatableProps; }
bool NativeReanimatedModule::handleEvent( const std::string &eventName, const int emitterReactTag, const jsi::Value &payload, double currentTime) { eventHandlerRegistry->processEvent( uiWorkletRuntime, currentTime, eventName, emitterReactTag, payload);
// TODO: return true if Reanimated successfully handled the event // to avoid sending it to JavaScript return false; }
bool NativeReanimatedModule::handleRawEvent( const RawEvent &rawEvent, double currentTime) { const EventTarget *eventTarget = rawEvent.eventTarget.get(); if (eventTarget == nullptr) { // after app reload scrollView is unmounted and its content offset is set // to 0 and view is thrown into recycle pool setting content offset // triggers scroll event eventTarget is null though, because it's // unmounting we can just ignore this event, because it's an event on // unmounted component return false; }
int tag = eventTarget->getTag(); auto eventType = rawEvent.type; if (eventType.rfind("top", 0) == 0) { eventType = "on" + eventType.substr(3); } jsi::Runtime &rt = uiWorkletRuntime_->getJSIRuntime();
const auto &eventPayload = rawEvent.eventPayload; jsi::Value payload = eventPayload->asJSIValue(rt);
const auto &payloadFactory = rawEvent.payloadFactory; jsi::Value payload = payloadFactory(rt);
auto res = handleEvent(eventType, tag, std::move(payload), currentTime); // TODO: we should call performOperations conditionally if event is handled // (res == true), but for now handleEvent always returns false. Thankfully, // performOperations does not trigger a lot of code if there is nothing to // be done so this is fine for now. performOperations(); return res; }
void NativeReanimatedModule::updateProps(
jsi::Runtime &rt,
const jsi::Value &operations) {
auto array = operations.asObject(rt).asArray(rt);
size_t length = array.size(rt);
for (sizet i = 0; i < length; ++i) {
auto item = array.getValueAtIndex(rt, i).asObject(rt);
auto shadowNodeWrapper = item.getProperty(rt, "shadowNodeWrapper");
auto shadowNode = shadowNodeFromValue(rt, shadowNodeWrapper);
const jsi::Value &updates = item.getProperty(rt, "updates");
operationsInBatch.emplace_back(
shadowNode, std::make_unique
// TODO: support multiple surfaces
surfaceId_ = shadowNode->getSurfaceId();
} }
void NativeReanimatedModule::performOperations() { if (operationsInBatch.empty() && tagsToRemove.empty()) { // nothing to do return; }
auto copiedOperationsQueue = std::move(operationsInBatch); operationsInBatch.clear();
jsi::Runtime &rt = uiWorkletRuntime_->getJSIRuntime();
{ auto lock = propsRegistry_->createLock();
if (copiedOperationsQueue.size() > 0) {
propsRegistry_->resetReanimatedSkipCommitFlag();
}
// remove recently unmounted ShadowNodes from PropsRegistry
if (!tagsToRemove_.empty()) {
for (auto tag : tagsToRemove_) {
propsRegistry_->remove(tag);
}
tagsToRemove_.clear();
}
// Even if only non-layout props are changed, we need to store the update
// in PropsRegistry anyway so that React doesn't overwrite it in the next
// render. Currently, only opacity and transform are treated in a special
// way but backgroundColor, shadowOpacity etc. would get overwritten (see
// `_propKeysManagedByAnimated_DO_NOT_USE_THIS_IS_BROKEN`).
for (const auto &[shadowNode, props] : copiedOperationsQueue) {
propsRegistry_->update(shadowNode, dynamicFromValue(rt, *props));
}
}
for (const auto &[shadowNode, props] : copiedOperationsQueue) {
const jsi::Value &nonAnimatableProps = filterNonAnimatableProps(rt, *props);
if (nonAnimatableProps.isUndefined()) {
continue;
}
Tag viewTag = shadowNode->getTag();
jsi::Value maybeJSPropsUpdater =
rt.global().getProperty(rt, "updateJSProps");
assert(
maybeJSPropsUpdater.isObject() &&
"[Reanimated] updateJSProps
not found");
jsi::Function jsPropsUpdater =
maybeJSPropsUpdater.asObject(rt).asFunction(rt);
jsPropsUpdater.call(rt, viewTag, nonAnimatableProps);
}
bool hasLayoutUpdates = false; for (const auto &[shadowNode, props] : copiedOperationsQueue) { if (isThereAnyLayoutProp(rt, props->asObject(rt))) { hasLayoutUpdates = true; break; } }
if (!hasLayoutUpdates) { // If there's no layout props to be updated, we can apply the updates // directly onto the components and skip the commit. for (const auto &[shadowNode, props] : copiedOperationsQueue) { Tag tag = shadowNode->getTag(); synchronouslyUpdateUIPropsFunction_(rt, tag, props->asObject(rt)); } return; }
if (propsRegistry_->shouldReanimatedSkipCommit()) {
// It may happen that performOperations
is called on the UI thread
// while React Native tries to commit a new tree on the JS thread.
// In this case, we should skip the commit here and let React Native do
// it. The commit will include the current values from PropsRegistry which
// will be applied in ReanimatedCommitHook.
return;
}
react_nativeassert(uiManager != nullptr); const auto &shadowTreeRegistry = uiManager_->getShadowTreeRegistry();
shadowTreeRegistry.visit(surfaceId_, [&](ShadowTree const &shadowTree) { shadowTree.commit( [&](RootShadowNode const &oldRootShadowNode) -> RootShadowNode::Unshared { PropsMap propsMap; for (auto &[shadowNode, props] : copiedOperationsQueue) { auto family = &shadowNode->getFamily(); react_nativeassert(family->getSurfaceId() == surfaceId); propsMap[family].emplace_back(rt, std::move(*props));
// Fix for catching nullptr returned from commit hook was
// introduced in 0.72.4 but we have only check for minor version
// of React Native so enable that optimization in React Native >=
// 0.73
if (propsRegistry_->shouldReanimatedSkipCommit()) {
return nullptr;
}
}
auto rootNode =
cloneShadowTreeWithNewProps(oldRootShadowNode, propsMap);
// Mark the commit as Reanimated commit so that we can distinguish it
// in ReanimatedCommitHook.
auto reaShadowNode =
std::reinterpret_pointer_cast<ReanimatedCommitShadowNode>(
rootNode);
reaShadowNode->setReanimatedCommitTrait();
return rootNode;
},
{ /* .enableStateReconciliation = */
false,
/* .mountSynchronously = */ true,
/* .shouldYield = */ [this]() {
return propsRegistry_->shouldReanimatedSkipCommit();
}
});
}); }
void NativeReanimatedModule::removeFromPropsRegistry( jsi::Runtime &rt, const jsi::Value &viewTags) { auto array = viewTags.asObject(rt).asArray(rt); for (sizet i = 0, size = array.size(rt); i < size; ++i) { tagsToRemove.push_back(array.getValueAtIndex(rt, i).asNumber()); } }
void NativeReanimatedModule::dispatchCommand( jsi::Runtime &rt, const jsi::Value &shadowNodeValue, const jsi::Value &commandNameValue, const jsi::Value &argsValue) { ShadowNode::Shared shadowNode = shadowNodeFromValue(rt, shadowNodeValue); std::string commandName = stringFromValue(rt, commandNameValue); folly::dynamic args = commandArgsFromValue(rt, argsValue); uiManager_->dispatchCommand(shadowNode, commandName, args); }
jsi::String NativeReanimatedModule::obtainProp( jsi::Runtime &rt, const jsi::Value &shadowNodeWrapper, const jsi::Value &propName) { jsi::Runtime &uiRuntime = uiWorkletRuntime_->getJSIRuntime(); const auto propNameStr = propName.asString(rt).utf8(rt); const auto shadowNode = shadowNodeFromValue(rt, shadowNodeWrapper); const auto resultStr = obtainPropFromShadowNode(uiRuntime, propNameStr, shadowNode); return jsi::String::createFromUtf8(rt, resultStr); }
jsi::Value NativeReanimatedModule::measure( jsi::Runtime &rt, const jsi::Value &shadowNodeValue) { // based on implementation from UIManagerBinding.cpp
auto shadowNode = shadowNodeFromValue(rt, shadowNodeValue); auto layoutMetrics = uiManager_->getRelativeLayoutMetrics( shadowNode, nullptr, {/ .includeTransform = */ true});
if (layoutMetrics == EmptyLayoutMetrics) {
// Originally, in this case React Native returns {0, 0, 0, 0, 0, 0}
,
// most likely due to the type of measure callback function which accepts
// just an array of numbers (not null). In Reanimated, measure
returns
// MeasuredDimensions | null
.
return jsi::Value::null();
}
auto newestCloneOfShadowNode =
uiManager_->getNewestCloneOfShadowNode(*shadowNode);
auto layoutableShadowNode = dynamic_cast<LayoutableShadowNode const *>(newestCloneOfShadowNode.get()); facebook::react::Point originRelativeToParent = layoutableShadowNode != nullptr ? layoutableShadowNode->getLayoutMetrics().frame.origin : facebook::react::Point();
auto frame = layoutMetrics.frame;
jsi::Object result(rt);
result.setProperty(
rt, "x", jsi::Value(static_cast
void NativeReanimatedModule::initializeFabric(
const std::sharedptr
initializeLayoutAnimations();
commitHook_ =
std::makeshared
void NativeReanimatedModule::initializeLayoutAnimations() {
uiManager_->setAnimationDelegate(nullptr);
auto scheduler = reinterpretcast<Scheduler *>(uiManager->getDelegate());
auto componentDescriptorRegistry =
scheduler->getContextContainer()
->at<std::weak_ptr
if (componentDescriptorRegistry) {
layoutAnimationsProxy_ = std::makeshared
jsi::Value NativeReanimatedModule::subscribeForKeyboardEvents(
jsi::Runtime &rt,
const jsi::Value &handlerWorklet,
const jsi::Value &isStatusBarTranslucent) {
auto shareableHandler = extractShareableOrThrow
void NativeReanimatedModule::unsubscribeFromKeyboardEvents( jsi::Runtime &, const jsi::Value &listenerId) { unsubscribeFromKeyboardEventsFunction_(listenerId.asNumber()); }
} // namespace reanimated
Here's my file: https://pastebin.com/t6vYx6aX
I am using react-native-reanimated: 3.15.1 and replaced the node_modules/react-native-reanimated/Common/cpp/reanimated/NativeModules/NativeReanimateModule.cpp
.
I think the problem is using builldTools 35.0.0 or using latest Ndk 27. Didn't want to downgrade so had to do this instead.
i am using react native cli v0.75.2, almost all reanimated is giving error. my build tools an target sdk set to 34 in android gradle file. Is there any way to solve this issue other than going to node_modules files. because they got change if i reinstalled them.
After investigating I indeed confirm that using NDK 27 is the root of this problem.
I've gone through NDK changelogs but haven't pin-pointed where exactly deprecation warnings became compilation errors. However even with NDK 26 -Wall
and -Werror
are appended so it might just have been a bug fix.
I will fix those deprecation warnings, however you shouldn't depend on this and you should probably disable such errors from dependencies. This is because React Native still uses NDK 26.
Description
hello some one can help me about this error
Steps to reproduce
None yet
Snack or a link to a repository
None yet
Reanimated version
3.15.1
React Native version
0.75.2
Platforms
Android
JavaScript runtime
None
Workflow
None
Architecture
None
Build type
None
Device
None
Device model
No response
Acknowledgements
Yes