簡體   English   中英

Travis CI Android 構建不斷失敗,gradlew 沒有這樣的文件

[英]Travis CI Android build keep failing with gradlew no such file

我的 travis ci build 一直失敗,

$ chmod +x /.gradlew chmod: cannot access '/.gradlew': No such file or directory 命令“chmod +x /.gradlew”失敗並在 .

我嘗試了所有建議,不同的 yml 文件,但無法擺脫這個錯誤。

我的 travis yml 在根目錄下,這是我的文件夾結構

根:/src .gitignore .travis.yml

源代碼:/客戶端/服務器

客戶端:/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 }

有什么建議嗎? 謝謝

要對此進行調試,您可以更改before_install部分以打印當前目錄並列出其內容。

 before_install: - pwd - ls -la - chmod +x /.gradlew

添加這個 .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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM