2017-11-04 11 views
0

react-native init NewProject 명령으로 새 프로젝트를 만들려고합니다. 이 프로젝트는 성공적으로 생성되었지만 내가 가진 genymotion 안드로이드 에뮬레이터에서 프로젝트를 실행하려고하면초기화 명령으로 반응하는 네이티브 프로젝트 만들기

>C:\IdeaProjects\proj>react-native run-android 

Scanning folders for symlinks in C:\IdeaProjects\proj\node_modules (56ms) 
JS server already running. 

Building and installing the app on the device (cd android && gradlew.bat installDebug)... 

Observed package id 'platform-tools' in inconsistent location 'C:\Android\Sdk\platform-tools' (Expected 'C:\Android\Sdk\platform-tools\platform-tools')  

Observed package id 'platform-tools' in inconsistent location 'C:\Android\Sdk\platform-tools' (Expected 'C:\Android\Sdk\platform-tools\platform-tools') 

Observed package id 'platform-tools' in inconsistent location 'C:\Android\Sdk\platform-tools' (Expected 'C:\Android\Sdk\platform-tools\platform-tools') 

Checking the license for package Android SDK Build-Tools 23.0.2 in C:\Android\Sdk\platform-tools\licenses 

License for package Android SDK Build-Tools 23.0.2 accepted. 

Preparing "Install Android SDK Build-Tools 23.0.2". 

>Warning: Trying to install into C:\Android\Sdk\platform-tools\build-tools\23.0.2\ but package "Android SDK Platform-Tools" already exists at C:\Android\Sdk\platform-tools\. It must be deleted o 
r moved away before installing into a child directory. 

Checking the license for package Android SDK Platform 23 in C:\Android\Sdk\platform-tools\licenses 

License for package Android SDK Platform 23 accepted. 

Preparing "Install Android SDK Platform 23". 

>Warning: Trying to install into C:\Android\Sdk\platform-tools\platforms\android-23\ but package "Android SDK Platform-Tools" already exists at C:\Android\Sdk\platform-tools\. It must be deleted 
or moved away before installing into a child directory. 


FAILURE: Build failed with an exception. 

A problem occurred configuring project ':app'. 
> Failed to install the following SDK components: 
    [Android SDK Platform 23, Android SDK Build-Tools 23.0.2] 
    Please install the missing components using the SDK manager in Android Studio. 

이미 성공적으로 설치 한 :

  • 안드로이드 SDK 플랫폼 react-native run-android 나는 다음과 같은 출력을 얻을 30
  • 안드로이드 SDK 빌드 - 도구 23.0.2

좀 봐 주실 분 있나요? 나는 몇 가지 주제를 읽었지만 성공하지 못했습니다.

답변

0

아주 좋은 문서 available here이 있습니다. "네이티브 코드로 프로젝트 만들기"섹션을 참조하십시오.

node, watchmanpython2, react-native-cli과 같은 다른 종속성을 설정할 필요가 있습니다. Mac 또는 Windows를 사용하는지 여부에 따라 다른 구성도 있습니다.

Create-React-Native-App도 살펴볼 수 있습니다. 쉽게 시작할 수있는 가장 좋은 방법입니다.

0

이전 빌드 도구로 새 SDK를 빌드 할 수 없습니다. 빌드 도구의 주요 버전은 SDK보다 작아야합니다. 작업 설정의 예 :

  • 안드로이드 SDK 플랫폼 (25)
  • 안드로이드 SDK 빌드 - 도구 25.0.3