Travis CI - Android Project Fails

Link: https://travis-ci.org/ameer1234567890/Cevapr/builds/42053662

My .travis.yml:

language: android android: components: - tools - build-tools-19.1.0 - android-19 - platform-tools before_script: - chmod +x gradlew 

Error:

 ./gradlew build connectedCheck : No such file or directory The command "./gradlew build connectedCheck" exited with 127. Done. Your build exited with 1. 
+6
source share
2 answers

Your gradlew file uses the Windows style (CRLF) and Travis-ci works on Linux, which uses the Unix style (LF).

Copy the gradlew file from a trusted project as https://github.com/google/iosched/blob/master/gradlew

or change it with a text editor like vim and turn off automatic conversion. Read this answer:

Source: Error using gradlew: / usr / bin / env: bash: no such file or directory

The problem was that Git on Windows converted line endings from gradlew from Unix style (LF) to Windows style (CRLF).

You can disable this automatic conversion using:

git config core.autocrlf false

Setting gradlew line endings back to Unix style fixed issue. In Vim, this is done with:

set fileformat=unix

replied March 10 at 13:47 Matthias Brown

+5
source

I found the answer here , it helped me
and below is a change to this file

 language: android android: components: - tools - build-tools-24.0.1 - android-24 - platform-tools - extra-android-support # because I'm use support library - extra-android-m2repository # because I'm use support library licenses: - '.+' sudo: required jdk: - oraclejdk8 install: true before_script: - chmod +x gradlew script: - ./gradlew assembleRelease --stacktrace 
0
source

Source: https://habr.com/ru/post/978665/


All Articles