Travis-ci "./gradlew build" team came out with 1

I cannot create an Android application using Travis-ci. He continues to fail:

Travis-ci command "./gradlew build" exited with 1. 

I have no idea what this means, and Travis-chi has no information on how to fix him!

Please inform Igor

+8
gradlew travis-ci
source share
3 answers

For anyone interested, I used the following Android components in my travis.yml file to solve the problem:

 android: components: # Update Android SDK Tools - tools - build-tools-23.0.1 - android-23 # Support library - extra-android-support - extra-android-m2repository 

In addition, my script section has the following:

 script: - chmod +x ./gradlew 

It seems to work now!

+9
source share

Hi, I have the same problem too, but the above solution did not work in my case. But if you fix it by specifying

 before_install: - chmod +x gradlew 

After applying chmode before before_install, I solved the problem.

Complete .travis.yml

 language: android android: components: # Uncomment the lines below if you want to # use the latest revision of Android SDK Tools # - platform-tools # - tools # The BuildTools version used by your project - build-tools-25.0.0 # The SDK version used to compile your project - android-25 # Specify at least one system image, # if you need to run emulator(s) during your tests - sys-img-armeabi-v7a-android-22 - sys-img-armeabi-v7a-android-17 before_install: - chmod +x gradlew 

I hope this helps anyone who cannot get a solution from the above answer.

+2
source share

I had to install jdk in the second line on 8, and it works:

 language: android jdk: oraclejdk8 android: ... 
+2
source share

All Articles