[英]Travis CI Android build keep failing with gradlew no such file
my travis ci build keeps failing with,我的 travis ci build 一直失败,
$ chmod +x /.gradlew chmod: cannot access '/.gradlew': No such file or directory The command "chmod +x /.gradlew" failed and exited with 1 during . $ chmod +x /.gradlew chmod: cannot access '/.gradlew': No such file or directory 命令“chmod +x /.gradlew”失败并在 .
I tried all the suggestions, different yml files but cant get rid of this error.我尝试了所有建议,不同的 yml 文件,但无法摆脱这个错误。
My travis yml is on root directory, the here is my folder structure我的 travis yml 在根目录下,这是我的文件夹结构
root: /src .gitignore .travis.yml根:/src .gitignore .travis.yml
src: /client /server源代码:/客户端/服务器
client: /app /gradle/wrapper build.gradle gradle.properties gradlew gradlew.bat settings.gradle客户端:/app /gradle/wrapper build.gradle gradle.properties gradlew gradlew.bat settings.gradle
Here is my travis.yml这是我的 travis.yml
sudo: false language: android jdk: - oraclejdk8 android: components: - tools - platform-tools - tools # The BuildTools version used by your project - build-tools-25.0.3 # The SDK version used to compile your project - android-25 - extra-google-google_play_services - extra-google-m2repository - extra-android-m2repository - addon-google_apis-google-19 before_install: - chmod +x /.gradlew script: - "/.gradlew clean build" notifications: email: false
and here is my build.gradle这是我的 build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.3.3' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { jcenter() maven { url "https://maven.google.com" } } } task wrapper(type: Wrapper) { gradleVersion = '2.3.3' } task clean(type: Delete) { delete rootProject.buildDir }
Any suggestions?有什么建议吗? Thanks
谢谢
To debug this you could change the before_install
section to print current directory and list its contents.要对此进行调试,您可以更改
before_install
部分以打印当前目录并列出其内容。
before_install: - pwd - ls -la - chmod +x /.gradlew
Add this .yml file添加这个 .yml 文件
- name: Check Directory
run: - pwd
- ls -la
- cd android && chmod +x ./gradlew
- name: Build Command
run: cd android && chmod +x ./gradlew
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.