2016-11-22 1 views
0

Ich habe ein Projekt in Github gespeichert und verknüpft mit Travis für CI. Diese Kombination funktioniert. Jetzt versuche ich diesen Code zu Heroku zu implementieren. Aber meine Schübe zu Heroku (mit git push heroku master) kehren mir diesen Fehler:Git/Heroku: SDK-Speicherort nicht gefunden

remote:  FAILURE: Build failed with an exception. 
    remote: 
    remote:  * What went wrong: 
    remote:  A problem occurred configuring project ':app'. 
    remote:  > SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable. 
    remote: 
    remote:  * Try: 
    remote:  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. 
    remote: 
    remote:  BUILD FAILED 
    remote: 
    remote:  Total time: 40.505 secs 
    remote: 
    remote: !  ERROR: Failed to run Gradle! 
    remote:  We're sorry this build is failing. If you can't find the issue in application 
    remote:  code, please submit a ticket so we can help: https://help.heroku.com 
    remote:  You can also try reverting to the previous version of the buildpack by running: 
    remote:  $ heroku buildpacks:set https://github.com/heroku/heroku-buildpack-gradle#previous-version 
    remote: 
    remote:  Thanks, 
    remote:  Heroku 
    remote: 
    remote: !  Push rejected, failed to compile Gradle app. 
    remote: 
    remote: !  Push failed 
    remote: Verifying deploy... 
    remote: 
    remote: !  Push rejected to (projectName). 
    remote: 
    To https://git.heroku.com/(projectName).git 
    ! [remote rejected] master -> master (pre-receive hook declined) 
    error: failed to push some refs to 'https://git.heroku.com/(projectName).git' 

Er sagt, ich brauche die SDK Lage in einer location.properties Datei zu unterscheiden.

Nun, wie könnte ich? Installiert Travis das SDK nicht automatisch bei jedem Build? Wie könnte ich auf etwas Dynamisches hindeuten?

Was fehlt mir?

Antwort

0

Laufen Sie nur git push heroku master am Ende Ihrer .travis.yml Datei nach den Tests? Oder führen Sie es in einem separaten deploy: Schritt?

Haben Sie versucht, das Travis CI Heroku deployment addon anstelle der Bereitstellung über git push zu verwenden? Vielleicht wird das funktionieren.