Alex Dai Playground

Posts match “ ionic ” tag:

[Ionic] cli

| Comments

cmd
// 開發環境資訊
ionic info

更新套件
npm update -g cordova ionic

更新 lib 中的 js
ionic lib update

// Saved platform 、plugins 、package.json
ionic state save

// restore via  package.json
ionic state restore

ionic state reset
ionic state clear

ionic browser list

// ionic browser revert android
ionic platform remove android
ionic browser rm crosswalk
ionic platform add android
ionic browser add crosswalk or ionic browser add crosswalk-lite
ionic build android

// remove platform
cordova platform remove android
cordova platform remove ios
cordova platform remove browser

// save plugin & platform to config.xml
cordova plugin save
cordova platform save

// restore plugin & platform from config.mxl
cordova prepare

// show plugin list
ionic(cordova) plugin list

// remove cordova plugin
cordova plugin remove "name"

// android & iso
ionic serve --lab

// port address
ionic serve --port 8100 --address localhost

// Config : .io-config.json
ionic config info
ionic config build
ionic config set CONFIG_KEY VALUE
ionic config unset CONFIG_KEY

// add gmc
ionic config set gcm_key <project_number>
ionic push --google-api-key <api_key>
ionic add ionic-service-core
ionic config build

// upload app to ionic
ionic login
ionic upload
ionic share EMAIL

// Crosswalk
ionic browser list
ionic browser add crosswalk
ionic browser add crosswalk@10.39.235.15 
ionic browser revert android // 移除該平台的瀏覽器
ionic browser rm crosswalk

remove all plugin

$ cordova plugin -l | awk '{print $1}' | xargs cordova plugins rm

save plugin platform

$ cordova plugin save; cordova platform save

重新安裝套件

via ionic

$ ionic platform remove android; ionic platform remove ios; ionic platform remove browser; ionic state restore; ionic state save;

via cordova

$ cordova platform remove android; cordova platform remove ios; cordova platform remove browser;cordova prepare

[Travis-CI] Could not find any version that matches com.android.support:support-v13:23+

| Comments

因為 ionic 使用了phonegap-plugin-push 套件

travis-ci 執行到 $ ionic build --release android

發生以下錯誤:

FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':_debugCompile'.
   > Could not find any version that matches com.android.support:support-v13:23+.
     Searched in the following locations:
         https://repo1.maven.org/maven2/com/android/support/support-v13/maven-metadata.xml
         https://repo1.maven.org/maven2/com/android/support/support-v13/
         file:/usr/local/android-sdk/extras/android/m2repository/com/android/support/support-v13/maven-metadata.xml
         file:/usr/local/android-sdk/extras/google/m2repository/com/android/support/support-v13/maven-metadata.xml
         file:/usr/local/android-sdk/extras/google/m2repository/com/android/support/support-v13/
     Required by:
         :android:unspecified
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED

解決方法:
.travis.yml add Additional components

  components:
  - extra-android-m2repository
  - extra-google-m2repository

https://github.com/travis-ci/travis-ci/issues/2470
http://docs.travis-ci.com/user/languages/android/#CI-Environment-for-Android-Projects