我的travis ci构建一直失败,错误信息如下:
$ chmod +x /.gradlew chmod: cannot access ‘/.gradlew’: No such file or directory The command "chmod +x /.gradlew" failed and exited with 1 during .
我尝试了所有的建议,不同的yml文件,但无法解决这个错误。
我的travis yml在根目录下,以下是我的文件夹结构:
根目录:/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
}