Travis CI 错误处理记录

这两天尝试了下Github上的集成服务Travis CI,然后出现了很多错误,现将处理方式记录,方便以后查阅:

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

    git update-index --chmod=+x gradlew

    之后再输入

    git ls-tree HEAD

    查看打印结果

    100644 blob xxxxxxxxxxx gradlew

    然后继续输入

    git commit -m "permission access for travis"

    在查看git ls-tree HEAD命令查看,会发现权限已经改变

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
    这两个问题的出现,我这边是因为在.travis.yml文件中存在#标记的注释,或者命令起始的-后面的缺少空格

  • java.lang.UnsupportedClassVersionError: com/android/build/gradle/AppPlugin : Unsupported major.minor version 52.0
    这个的解决方案是在.travis.yml文件内增加:

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-.+'

解决方案实际链接:
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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容