Travis未能建立Android项目,没有local.properties [英] Travis fails to build Android project, no local.properties

查看:388
本文介绍了Travis未能建立Android项目,没有local.properties的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是事情。我已经在Travis CI上多次构建了我的项目,但每次都遇到同样的问题。



错误日志:

发生了什么问题:
评估根项目'LiteReader'时发生问题。
/home/travis/build/Mindjet/LiteReader/local.properties(没有这样的文件或目录)



确实,我上传的项目有没有local.properties ,我将它排除在外,因为它包含特定于本地配置的信息。

它是我的.travis.yml

 语言:android 
缓存:捆绑包

android:
组件:
- tools
- build-tools-25.0.2
- android-25
- extra-android-m2repository
- extra-android - 支持

before_install:
- chmod + x gradlew

脚本:
./gradlew checkstyle构建

我该如何解决这个问题?请帮忙,谢谢。

解决方案

晚会有点晚,但我遇到了同样的问题,发现了一个更简单的解决方案:

  before_script:
- touch local.properties

这将在运行脚本之前创建文件,但不需要在项目中创建并添加一个假文件。


Here is the thing. I've built my project on the Travis CI several times, but got the same problem every time.

The error log:

What went wrong: A problem occurred evaluating root project 'LiteReader'. /home/travis/build/Mindjet/LiteReader/local.properties (No such file or directory)

It's true that the project I uploaded has no local.properties, I've excluded it because it contains information specific to local configuration.

It's my .travis.yml

language: android
cache: bundler

android:
  components:
    - tools
    - build-tools-25.0.2
    - android-25
    - extra-android-m2repository
    - extra-android-support

before_install:
  - chmod +x gradlew

script:
      ./gradlew checkstyle build

How can I solve this problem? Please help, Thanks.

解决方案

A bit late to the party, but I ran into the same issue and found a simpler solution:

before_script:
  - touch local.properties

This will create the file, before running the script, but without the need to create and add a "fake" file into your project.

这篇关于Travis未能建立Android项目,没有local.properties的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆