0

Android SDK 플랫폼 25을 실행하려고하지만 Android SDK 23을 사용하여 기본적으로 유지됩니다. Lynda.com의 튜토리얼을 따르고 있고 react-native run-android을 실행하면됩니다. 나는 answer 플랫폼 25 및 플랫폼 23에 대한 새 패키지를 추가하여 시도했지만 여전히 동일한 문제 (라이센스 문제 및 sdk-25를 사용할 수 없음)가 있습니다. 그래서 내 질문에 어떻게 안드로이드 SDK 버전을 사용할 수 선택할 수 있습니다.android-sdk 버전을 어떻게 사용할 수 있습니까?

➜ Bakesale react-native run-android 
Scanning folders for symlinks in /home/guinslym/Documents/Github/Bakesale/node_modules (24ms) 
JS server already running. 
Building and installing the app on the device (cd android && ./gradlew installDebug)... 
File /home/guinslym/.android/repositories.cfg could not be loaded. 
Checking the license for package Android SDK Build-Tools 23.0.1 in /opt/android-sdk/licenses 
Warning: License for package Android SDK Build-Tools 23.0.1 not accepted. 
Checking the license for package Android SDK Platform 23 in /opt/android-sdk/licenses 
Warning: License for package Android SDK Platform 23 not accepted. 

FAILURE: Build failed with an exception. 

* What went wrong: 
A problem occurred configuring project ':app'. 
> You have not accepted the license agreements of the following SDK components: 
    [Android SDK Platform 23, Android SDK Build-Tools 23.0.1]. 
    Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager. 
    Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html 

* Try: 
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. 

BUILD FAILED 

이 SDK는 또한 다른 디렉토리

➜ 24.0.3 cd 
➜ ~ cd /home/guinslym/Android/Sdk 
➜ Sdk ls 
add-ons  emulator licenses platforms  skins system-images 
build-tools extras patcher platform-tools sources tools 
➜ Sdk cd build-tools 
➜ build-tools ls 
23.0.1 26.0.1 26.0.2 27.0.2 

그림에 설치되어있는 것으로 보인다 내 Android sdk 경로

➜ Bakesale echo $ANDROID_HOME         
/opt/android-sdk 
➜ Bakesale cd !$ 
➜ Bakesale cd $ANDROID_HOME 
➜ android-sdk tree -L 3  
. 
└── build-tools 
    ├── 23.0.3 
    │   ├── aapt 
    │   ├── aarch64-linux-android-ld 
    │   ├── aidl 
    │   ├── arm-linux-androideabi-ld 
    │   ├── bcc_compat 
    │   ├── dexdump 
    │   ├── dx 
    │   ├── i686-linux-android-ld 
    │   ├── jack.jar 
    │   ├── jill.jar 
    │   ├── lib 
    │   ├── llvm-rs-cc 
    │   ├── mainDexClasses 
    │   ├── mainDexClasses.rules 
    │   ├── mipsel-linux-android-ld 
    │   ├── NOTICE.txt 
    │   ├── renderscript 
    │   ├── runtime.properties 
    │   ├── source.properties 
    │   ├── split-select 
    │   └── zipalign 
    └── 24.0.3 
     ├── aapt 
     ├── aapt2 
     ├── aarch64-linux-android-ld 
     ├── aidl 
     ├── apksigner 
     ├── arm-linux-androideabi-ld 
     ├── bcc_compat 
     ├── dexdump 
     ├── dx 
     ├── i686-linux-android-ld 
     ├── jack-coverage-plugin.jar 
     ├── jack-jacoco-reporter.jar 
     ├── jack.jar 
     ├── jill.jar 
     ├── lib 
     ├── lib64 
     ├── llvm-rs-cc 
     ├── mainDexClasses 
     ├── mainDexClasses.rules 
     ├── mipsel-linux-android-ld 
     ├── NOTICE.txt 
     ├── renderscript 
     ├── runtime.properties 
     ├── source.properties 
     ├── split-select 
     ├── x86_64-linux-android-ld 
     └── zipalign 

➜ 24.0.3 sdkmanager 
zsh: command not found: sdkmanager 

입니다 enter image description here enter image description here enter image description here

0 내가 콘솔 (쉘)의 API (25) 또는 (24)의 AVD 매니저를 사용하고 그래서 비록

는 기본적으로 API (25)를 사용하고 난 항상 내가 Antergos를들이받은 오전 23

에 대한 라이센스 문제를 취득 (아치 -linux based)

답변

1

나는 실제로 최근에 이와 비슷한 것을 경험했다. 빌드 도구를 변경하려고했지만 라이센스가 승인되지 않았다고 계속 말했습니다. 이 일이 나에게 돌아 왔을 때 다시 설치하려고 시도했지만 라이센스 오류로 인해 계속 실패했습니다.

솔루션은 내가 완전히 SDK 폴더를 삭제하고 내가 설치 한 각 도구에 대한 라이센스를 받아 확인하고 내 SDK를 다시 설치. 당신은 당신은 아마 도구를 구축하고 변경 사항이 작동하기 전에 응용 프로그램을 다시 변경 한 후 다시 Gradle를 동기화해야합니다 당신이 android/app/build.gradle

android { 
    compileSdkVersion 25 
    buildToolsVersion '25.0.0' 
    defaultConfig { 
     applicationId packageId 
     minSdkVersion 19 
     targetSdkVersion 25 
     versionCode buildVersionCode() 
     versionName version 
     ndk { 
      abiFilters "armeabi-v7a", "x86" 
     } 
    } 

build.gradle 파일을 업데이트 빌드 도구를 변경하는 경우

것이 있는지 확인합니다. 그렇다면 Android Studio IDE에서 애플리케이션을 열 때 Android Studio가 알려야합니다.

React 네이티브 응용 프로그램에서는 here을 볼 수있는 빌드 도구 23을 사용해야합니다.