Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Travis CI Cordova Android build
language: android
node_js:
- 5.5
notifications:
email: false
sudo: false
branches:
only:
- master
install:
- npm cache clean
- npm install
- npm install -g cordova
- echo y | android update sdk -u --filter android-22,android-23
before_script:
- cordova platform rm android
- cordova platform add android
script:
- cordova prepare
- cordova build android --release -- --ant
release:
- exit 0
@kaiyuan01

This comment has been minimized.

Copy link

commented Nov 4, 2016

This did not work. Got errors like this:

/home/travis/.cordova/lib/npm_cache/cordova-android/6.0.0/package/bin/templates/cordova/lib/AndroidStudio.js:16
for(file of eclipseFiles) {
^^
Running command: /home/travis/.cordova/lib/npm_cache/cordova-android/6.0.0/package/bin/create /home/travis/build/kaiyuan01/aerogear-aerodoc-cordova/platforms/android io.cordova.hellocordova HelloCordova --cli
/home/travis/.cordova/lib/npm_cache/cordova-android/6.0.0/package/bin/templates/cordova/lib/AndroidStudio.js:16
for(file of eclipseFiles) {
^^
SyntaxError: Unexpected identifier
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/home/travis/.cordova/lib/npm_cache/cordova-android/6.0.0/package/bin/templates/cordova/lib/AndroidProject.js:24:21)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
Error: /home/travis/.cordova/lib/npm_cache/cordova-android/6.0.0/package/bin/create: Command failed with exit code 8
The command "cordova platform add android" failed and exited with 1 during .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.