2017-04-01 3 views
1

설명초기 기본 네이티브 앱을 실행할 수 없습니다.

기본 자습서에 따라 초기 네이티브 앱을 실행할 수 없습니다. 이 오류는 UIUserInterfaceIdiomCarPlay와 관련이있는 것으로 보입니다. 튜토리얼에 따라

복제 단계 및 샘플 코드

여기

https://facebook.github.io/react-native/releases/0.23/docs/tutorial.html#content 나는 새가 react-native init AwesomeProject 그런 다음 디렉토리로 가서 기본 프로젝트 반응 생성하고, 나는 또한 엑스 코드에서 시도 react-native run-ios

주를 실행 , 그리고 무수한 온라인 픽스가 있지만 주사위는 아직 없습니다.

/Users/lauracressman/Desktop/AwesomeProject/node_modules/react-native/React/Base/RCTPlatform.m:26:10: error: use of undeclared identifier 'UIUserInterfaceIdiomCarPlay'; did you mean 'UIUserInterfaceIdiomPad'? case UIUserInterfaceIdiomCarPlay: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ UIUserInterfaceIdiomPad In module 'UIKit' imported from /Users/lauracressman/Desktop/AwesomeProject/node_modules/react-native/React/Base/RCTPlatform.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: note: 'UIUserInterfaceIdiomPad' declared here UIUserInterfaceIdiomPad NS_ENUM_AVAILABLE_IOS(3_2), // iPad style UI ^ /Users/lauracressman/Desktop/AwesomeProject/node_modules/react-native/React/Base/RCTPlatform.m:26:10: error: duplicate case value 'UIUserInterfaceIdiomPad' case UIUserInterfaceIdiomCarPlay: ^ /Users/lauracressman/Desktop/AwesomeProject/node_modules/react-native/React/Base/RCTPlatform.m:22:10: note: previous case defined here case UIUserInterfaceIdiomPad: ^ 2 errors generated.

추가 정보

은 기본 버전 반작용 : 이것은 내가 가진 오류입니다 0.42.3을

플랫폼 : 아이폰 OS

개발 운영 체제 : 맥 OS

데브 도구 : Xcode, 명령 줄

+0

실행중인 Xcode 버전은 무엇입니까? –

+0

Xcode를 버전 8.1 이상으로 업데이트하십시오. – Hariks

답변

0

Someone은 최근에 같은 오류 메시지 Use of undeclared identifier 'UIUserInterfaceIdiomCarPlay'; did you mean 'UIUserInterfaceIdiomPad'?에 직면했습니다. 그는 에서27 줄을 주석 처리했으며 분명히 작동하도록했습니다. Xcode의 구 버전을 사용하는 것과 관련이 있습니다.

관련 문제