如何修复travis.yml中拒绝的gradlew权限?

时间:2015-12-03 22:00:14

标签: android gradle build travis-ci

在travisci上运行构建时,由于使用gradlew文件拒绝权限,它似乎失败了。我怎样才能解决这个问题?这是Travis-ci.org上的内容:

   $ java -Xmx32m -version
     java version "1.7.0_76"
     Java(TM) SE Runtime Environment (build 1.7.0_76-b13)
     Java HotSpot(TM) 64-Bit Server VM (build 24.76-b04, mixed mode)
   $ javac -J-Xmx32m -version
     javac 1.7.0_76
     0.00s$ ./gradlew build connectedCheck
     /home/travis/build.sh: line 45: ./gradlew: Permission denied

     The command "./gradlew build connectedCheck" exited with 126.

     Done. Your build exited with 1.

1 个答案:

答案 0 :(得分:12)

我猜您可以在travis.yml文件中添加以下内容:

before_install:
 - chmod +x gradlew