我的travis ci构建始终失败,
$ chmod + x /.gradlew chmod:无法访问'/.gradlew':没有这样的文件或目录 命令“chmod + x /.gradlew”失败并在1期间退出。
我尝试了所有的建议,不同的yml文件,但无法摆脱这个错误。
我的travis yml在根目录下,这是我的文件夹结构
root:/ src .gitignore .travis.yml
src:/ client / server
客户端:/ app / gradle / wrapper build.gradle gradle.properties gradlew gradlew.bat settings.gradle
这是我的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
这是我的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
}
有什么建议吗?感谢
答案 0 :(得分:0)
添加此.yml文件
- name: Check Directory
run: - pwd
- ls -la
- cd android && chmod +x ./gradlew
- name: Build Command
run: cd android && chmod +x ./gradlew
答案 1 :(得分:-1)
要调试此项,您可以将before_install
部分更改为打印当前目录并列出其内容。
before_install:
- pwd
- ls -la
- chmod +x /.gradlew