首页 > 解决方案 > React Native - 找不到名称为“focus”的命令

问题描述

我在我的 Xcode 中运行 react-native 应用程序,它可以构建成功,但是当我单击登录页面的 Textinput 时,它抛出了一个错误:

No command found with name "focus"

-[RCTUIManager dispatchViewManagerCommand:commandID:commandArgs:]
    RCTUIManager.m:1115
__invoking___
-[NSInvocation invoke]
-[NSInvocation invokeWithTarget:]
-[RCTModuleMethod invokeWithBridge:module:arguments:]
facebook::react::invokeInner(RCTBridge*, RCTModuleData*, unsigned int, folly::dynamic const&)
facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&, int)::$_0::operator()() const
invocation function for block in facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&, int)
_dispatch_call_block_and_release
_dispatch_client_callout
_dispatch_lane_serial_drain
_dispatch_lane_invoke
_dispatch_workloop_worker_thread
_pthread_wqthread
start_wqthread

我搜索了所有问题,但没有一个可以解决这个问题。这个错误的原因是什么?

标签: react-native

解决方案


推荐阅读