2017-05-09 3 views
1

내가 내 프로젝트 중 하나에 대한 CI를 구현하기 위해 노력하고 문제 트래비스는 다음과 같은 오류와 함께 종료 실행될 때마다 :트래비스

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 Build-Tools 25.0.1, Android SDK Platform 25]. 
    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 

내가 this question, this example 겪었 및 일부 다른,하지만 난 내가 뭘 잘못하고 있는지 알아낼 수 없어.

language: android 
jdk: 
    - oraclejdk8 
sudo: true 
before_install: 
- chmod +x gradlew 
env: 
    global: 
    - ANDROID_API_LEVEL=23 
    - EMULATOR_API_LEVEL=21 
    - ANDROID_BUILD_TOOLS_VERSION=23.0.1 
    - ANDROID_ABI=armeabi-v7a 
    - ANDROID_TAG=google_apis 
    - ADB_INSTALL_TIMEOUT=8 # minutes (2 minutes by default) 
android: 
    components: 
    - tools 
    - tools 
    - platform-tools 
    - build-tools-$ANDROID_BUILD_TOOLS_VERSION 
    - android-$ANDROID_API_LEVEL 
    - android-$EMULATOR_API_LEVEL 
    - extra 
    - add-on 
    - extra-google-m2repository 
    - extra-android-m2repository 

    # Google Play Services 
    - extra-google-google_play_services 
    # Support library 
    - extra-android-support 

    - addon-google_apis-google-$ANDROID_API_LEVEL 
    - addon-google_apis-google-$EMULATOR_API_LEVEL 

    - sys-img-armeabi-v7a-google_apis-$ANDROID_API_LEVEL 
    - sys-img-armeabi-v7a-google_apis-$EMULATOR_API_LEVEL 

    licenses: 
    - 'android-sdk-preview-license-.+' 
    - 'android-sdk-license-.+' 
    - 'intel-android-extra-license.+' 

before_script: 
    - echo no | android create avd --force -n test -t "android-23" --abi $ANDROID_ABI --tag $ANDROID_TAG 
    - emulator -avd test -no-window & 
    - android-wait-for-emulator 
    - adb shell input keyevent 82 & 

이 경우 사람이 프로젝트 github page를 참조하십시오에 대해 더 자세한 정보를 필요로했다.

답변

1

그래, 내 인터넷 검색을보다 효율적으로 만들 수 있도록 약간의 커피가 문제를 해결했습니다. 이 문제는 here에 자세히 설명되어 있습니다. 다음 코드를 코드에 추가해야했습니다 (여전히이 코드는 무엇이 필요한지 이해하지 못하지만 적어도 작동은합니다).

- build-tools-25.0.1 
- android-25 
+0

감사합니다! Android SDK 26을 타겟팅하고 빌드 도구 26.0.1을 사용하는 경우에도 동일한 로직이 적용됩니다. 그 부족한 라이센스를 받아들이 기 위해 많은 노력을 기울였습니다. 왜 그런지 모르지만 이러한 구성 요소를 추가하면 승인되지 않은 라이센스 문제가 해결됩니다. –