Skip to content
This repository has been archived by the owner on Nov 13, 2019. It is now read-only.

Android Travis CI 問題 #1

Open
ych861031 opened this issue Jan 1, 2018 · 1 comment
Open

Android Travis CI 問題 #1

ych861031 opened this issue Jan 1, 2018 · 1 comment

Comments

@ych861031
Copy link

我已經照助教所說的將原本的架構改成了android的了,travis.yml也找網路上很多種寫法,但每一種都無法成功使用,後來是到了感覺最接近的版本,也有搜尋了解決方法,也無法解決,
錯誤如下:
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 26.0.2].
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.
  • Get more help at https://help.gradle.org
    BUILD FAILED in 31s
    The command "./gradlew build" exited with 1.
    Done. Your build exited with 1.

我測試的project: https://github.com/ych861031/BaseProject
不知道助教知不知道問題出在哪,麻煩助教了

@jyhsu2000
Copy link
Contributor

jyhsu2000 commented Jan 1, 2018

需要在app/build.gradle補上 build tools 版本,且版本必須跟.travis.yml一致
再考慮到Gradle版本的限制,請照以下操作將版本統一改為26.0.2

.travis.yml

將 build tools 版本改為 26.0.2

    - build-tools-26.0.2

app/build.gradle

compileSdkVersion下方補上buildToolsVersion並指定為26.0.2

android {
    compileSdkVersion 26
    buildToolsVersion "26.0.2"

這樣修改之後,應該就可以順利在Travis CI運行了

相關討論與其他解法可參考:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants