本文介绍了Github上发布Android项目,特拉维斯不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我们有如下的 travis.yml
文件:
language: android
android:
components:
- extra-android-m2repository
- build-tools-21.1.2
- android-21
- sys-img-armeabi-v7a-android-21
licenses:
- android-sdk-license-.+
script: ./gradlew assemble
before_deploy:
- git config --global user.email "[email protected]"
- git config --global user.name "Travis CI"
- export GIT_TAG=$TRAVIS_BUILD_NUMBER
- git tag $GIT_TAG -a -m "Generated tag from Travis CI for build $TRAVIS_BUILD_NUMBER"
- git push -q [deleted] --tags
- cp ./app/build/outputs/apk/*.apk .
deploy:
provider: releases
api_key:
secure: [deleted]
file:
- "app-debug.apk"
- "app-release-unsigned.apk"
on:
repo: [deleted]
branch: master
但是,在运行整个构建我收到以下消息后:
However, after running the whole build I get the following message:
Deploying application
Already up-to-date!
# HEAD detached at ad25432
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# app-debug-unaligned.apk
# app-debug.apk
# app-release-unsigned.apk
#
nothing added to commit but untracked files present (use "git add" to track)
Dropped refs/stash@{0} (06ce20597689d21dbeb937f9cc1ac1529ba6c14c)
/home/travis/.rvm/gems/ruby-1.9.3-p551/gems/octokit-4.1.0/lib/octokit/client/releases.rb:86:in `initialize': No such file or directory - app-debug.apk (Errno::ENOENT)
from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/octokit-4.1.0/lib/octokit/client/releases.rb:86:in `new'
from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/octokit-4.1.0/lib/octokit/client/releases.rb:86:in `upload_asset'
from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/dpl-1.7.21/lib/dpl/provider/releases.rb:118:in `block in push_app'
from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/dpl-1.7.21/lib/dpl/provider/releases.rb:102:in `each'
from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/dpl-1.7.21/lib/dpl/provider/releases.rb:102:in `push_app'
from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/dpl-1.7.21/lib/dpl/provider.rb:141:in `block in deploy'
from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/dpl-1.7.21/lib/dpl/cli.rb:41:in `fold'
from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/dpl-1.7.21/lib/dpl/provider.rb:141:in `deploy'
from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/dpl-1.7.21/lib/dpl/cli.rb:32:in `run'
from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/dpl-1.7.21/lib/dpl/cli.rb:7:in `run'
from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/dpl-1.7.21/bin/dpl:5:in `<top (required)>'
from /home/travis/.rvm/gems/ruby-1.9.3-p551/bin/dpl:23:in `load'
from /home/travis/.rvm/gems/ruby-1.9.3-p551/bin/dpl:23:in `<main>'
failed to deploy
我曾经设置文件:
属性的build.gradle
来测试,而且工作。但是,这是为什么不工作?
I once set the file:
property to build.gradle
to test, and that worked. But why is this not working?
推荐答案
好吧,发现(相当明显的,现在我看到它)的问题:我的构建输出是被删除...
Ok, found the (rather obvious, now that I see it) issue: my build output was being deleted...
我用特拉维斯设置发布
,但不知何故未添加 skip_cleanup:真正的
我的部署
块。
I used travis setup releases
but somehow that did not add skip_cleanup: true
to my deploy
block.
这篇关于Github上发布Android项目,特拉维斯不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!