Reactjs 无法获取要运行的初始React本机应用程序
描述 根据基本教程,我无法运行初始React本机应用程序。该错误似乎与UIUserInterfaceIdiomCarPlay有关 复制步骤和示例代码 下面是教程 我创建了一个新的React Native项目Reactjs 无法获取要运行的初始React本机应用程序,reactjs,react-native,Reactjs,React Native,描述 根据基本教程,我无法运行初始React本机应用程序。该错误似乎与UIUserInterfaceIdiomCarPlay有关 复制步骤和示例代码 下面是教程 我创建了一个新的React Native项目React Native init AwesomeProject 然后进入目录,运行react native run ios 注意,我也尝试过Xcode和无数的在线修复,但仍然没有骰子。这是我得到的错误: /Users/lauraccressman/Desktop/AwesomeProjec
React Native init AwesomeProject
然后进入目录,运行react native run ios
注意,我也尝试过Xcode和无数的在线修复,但仍然没有骰子。这是我得到的错误:
/Users/lauraccressman/Desktop/AwesomeProject/node_modules/react native/react/Base/rctpplatform.m:26:10:错误:使用了未声明的标识符“UIUserInterfaceIdiomCarPlay”;你是说“UIUserInterfaceIdiomPad”吗?
案例UIUserInterfaceIdiomCarPlay:
^~~~~~~~~~~~~~~~~~~~~~~~~~~
UIUserInterfaceIdiomPad
在从/Users/lauraccressman/Desktop/AwesomeProject/node\u modules/react native/react/Base/rctpplatform导入的模块“UIKit”中。m:12:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIDevice.h:33:5:注意:此处声明了“UIUserInterfaceIdiomPad”
UIUserInterfaceIdiomPad NS_ENUM_AVAILABLE_IOS(3_2),//iPad风格的用户界面
^
/Users/lauracressman/Desktop/AwesomeProject/node_modules/react-native/react/Base/rctpplatform.m:26:10:错误:重复大小写值“UIUserInterfaceIdiomPad”
案例UIUserInterfaceIdiomCarPlay:
^
/Users/lauraccessman/Desktop/AwesomeProject/node_modules/react native/react/Base/rctpplatform.m:22:10:注意:前面的案例定义在这里
案例UIUserInterfaceIdiomPad:
^
产生2个错误。
补充资料
React本机版本:0.42.3
平台:iOS
开发操作系统:MacOS
开发工具:Xcode,命令行最近遇到了相同的问题,错误消息
使用了未声明的标识符“UIUserInterfaceIdiomCarPlay”;你是说“UIUserInterfaceIdiomPad”吗?
。他注释掉了node\u modules/react native/react/Base/rctpplatform.m
中的第26行和第27行,并显然让它开始工作。这可能与使用过时版本的Xcode有关,最近遇到了与使用未声明标识符“UIUserInterfaceIdiomCarPlay”的错误消息相同的问题;你是说“UIUserInterfaceIdiomPad”吗?
。他注释掉了node\u modules/react native/react/Base/rctpplatform.m
中的第26行和第27行,并显然让它开始工作。这可能与使用过时版本的Xcode有关您运行的是什么版本的Xcode?将Xcode更新到8.1或更高版本您运行的是什么版本的Xcode?将Xcode更新到8.1或更高版本