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 

enter image description here enter image description here enter image description here

0写真

➜ 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 

SDKは、他のディレクトリにインストールされているようだ私の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 

です

私はコンソール(シェル)上でAPI 25または24のAVDマネージャを使用していますが、デフォルトでAPI 25を使用していますが、私は常に23のライセンス問題を取得します。

私はAntergos -linuxベース)

答えて

1

私は実際にこのようなことを最近行っていました。ビルドツールを変更しようとしていて、ライセンスが受け入れられていないと言っていました。これが私に起こったとき、私は戻って再びインストールしようとしましたが、ライセンスエラーで失敗し続けました。

ソリューションは、私は完全にSDKのフォルダを削除し、私がインストールされた各ツールのライセンスを受け入れることを確認して、私のSDKを再インストールしました。あなたはおそらく、ツールを構築し、変更が動作する前に、アプリケーションを再構築変更した後、再び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ネイティブアプリケーションはビルドツール23を使用する必要があります。hereというドキュメントを参照してください。

関連する問題