Travis CI 錯(cuò)誤處理記錄

這兩天嘗試了下Github上的集成服務(wù)Travis CI,然后出現(xiàn)了很多錯(cuò)誤,現(xiàn)將處理方式記錄,方便以后查閱:

  • ./gradlew: Permission denied
    解決方式:
    一. 在git界面輸入如下命令

    git update-index --chmod=+x gradlew

    之后再輸入

    git ls-tree HEAD

    查看打印結(jié)果

    100644 blob xxxxxxxxxxx gradlew

    然后繼續(xù)輸入

    git commit -m "permission access for travis"

    在查看git ls-tree HEAD命令查看,會(huì)發(fā)現(xiàn)權(quán)限已經(jīng)改變

100755 blob xxxxxxxxxxxxx gradlew

二. 或者你可以直接在.travis.yml 中添加如下命令:
>before_install:
- chmod +x gradlew

  • did not find expected '-' indicator while parsing a block collection at line 5 column 5

  • /home/travis/build.sh: line 57: eval: -": invalid option
    這兩個(gè)問題的出現(xiàn),我這邊是因?yàn)樵?travis.yml文件中存在#標(biāo)記的注釋,或者命令起始的-后面的缺少空格

  • java.lang.UnsupportedClassVersionError: com/android/build/gradle/AppPlugin : Unsupported major.minor version 52.0
    這個(gè)的解決方案是在.travis.yml文件內(nèi)增加:

jdk: oraclejdk8

即可解決問題

  • You have not accepted the license agreements of the following SDK components
    同樣在.travis.yml 文件中增加

android:
components:
- tools
- platform-tools
licenses:
- 'android-sdk-preview-license-.+'
- 'android-sdk-license-.+'
- 'google-gdk-license-.+'

解決方案實(shí)際鏈接:
Permission denied 1
Permission denied 2
Unsupported major.minor version 52.0
You have not accepted the license agreements of the following SDK components
You have not accepted the license agreements of the following SDK components

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

推薦閱讀更多精彩內(nèi)容