2016-10-09 6 views
1

내가 비주얼 스튜디오 팀 서비스에서 작동하는 안드로이드 Gradle을 빌드 정의를 만들려고 해요하지만 난 항상이 오류 얻을 구축 :안드로이드 Gradle을 비주얼 스튜디오 팀 서비스 SDK 라이센스 오류

2016-10-09T07:30:56.0626848Z FAILURE: Build failed with an exception. 
2016-10-09T07:30:56.0626848Z 
2016-10-09T07:30:56.0626848Z * What went wrong: 
2016-10-09T07:30:56.0626848Z A problem occurred configuring project ':twuice_theme'. 
2016-10-09T07:30:56.0636849Z > You have not accepted the license agreements of the following SDK components: 
2016-10-09T07:30:56.0636849Z [Android SDK Platform 24, Android SDK Build-Tools 24.0.3]. 
2016-10-09T07:30:56.0636849Z 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. 
2016-10-09T07:30:56.0636849Z 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 
2016-10-09T07:30:56.0636849Z 
2016-10-09T07:30:56.0636849Z * Try: 
2016-10-09T07:30:56.0636849Z Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. 
2016-10-09T07:30:56.0636849Z 
2016-10-09T07:30:56.0636849Z BUILD FAILED 
2016-10-09T07:30:56.0636849Z 
2016-10-09T07:30:56.0636849Z Total time: 55.145 secs 
2016-10-09T07:30:56.4528586Z [Error: C:\a\1\s\gradlew.bat failed with return code: 1] 
2016-10-09T07:30:56.4718591Z ##[error]Error: C:\a\1\s\gradlew.bat failed with return code: 1 
2016-10-09T07:30:56.4788582Z ##[section]Finishing: gradlew build 

내가 검색하지만 'didn를을 유용한 것을 찾지 못해 누군가가 나를 도울 수 있습니까? 이 오류를 고정하는 방법이 정의된다 here 미리

답변

2

감사합니다. 다음은 Visual Studio Team Services에서 수정하는 방법입니다. 단계는

  1. "% ANDROID_HOME % \ licenses"디렉토리를 만듭니다.
  2. "% ANDROID_HOME % \ licenses \ android-sdk-license"파일을 만듭니다.
  3. 확인을 위해 생성 된 파일의 내용을 출력합니다.

가 여기에 세부 사항을이다 :

  1. 만들기 새로운 유형의 '유틸리티'카테고리에있는 "명령 줄", "단계 구축".

    • 도구 = mkdir
    • 인수 = "%ANDROID_HOME%\licenses"
  2. 단계를 구축 할 또 다른 "명령 줄"을 만듭니다.

    • 도구 = echo
    • 인수 = |set /p="8933bad161af4178b1185d1a37fbf41ea5269c55" > "%ANDROID_HOME%\licenses\android-sdk-license"
    • 확인 세 번째 "명령 줄을"이 echo 명령은 확인을 위해 1
  3. 를 반환하기 때문에, "오류에 계속"을 만들 빌드 단계
    • 공구 = more
    • 인수 = "%ANDROID_HOME%\licenses\android-sdk-license"

장소 이들은 이전 단계를 구축하여 "Gradle을"을 실행하기 1,2,3 순서로 단계를 구축 할 수 있습니다.

좋은 소식입니다. 나쁜 소식은 SDK 설치 중 "기존 대상 파일을 옮기지 못하거나 삭제하지 못했습니다."라는 오류 메시지와 함께 gradle 빌드 단계가 실패한 것입니다. 그러니 그걸 알아 내면 알려주세요.

1

해결 방법을 제공해 주셔서 감사합니다. 내가 겪었던 한 가지 문제점은 2 단계의 오류로 인해 빌드가 "부분적으로 성공"했기 때문입니다.

New-Item -ItemType Directory -Path "C:\java\androidsdk\android-sdk\licenses" 

New-Item -Name 'android-sdk-license' -ItemType File -Value '8933bad161af4178b1185d1a37fbf41ea5269c55' -Path "C:\java\androidsdk\android-sdk\licenses" 

Get-Content "C:\java\androidsdk\android-sdk\licenses\android-sdk-license" 
:

것은 내가 인라인 스크립트를 실행 한 파워 쉘 단계와 세 개의 명령 줄 단계를 대체 빌드 대신 "부분적으로 성공"빌드 "성공"얻으려면

관련 문제