ionic mac 配置android路过的坑

错误一:

ionic platform add android@版本号   有时候升级过后很多插件不能用


错误二:

trunk1  sudo cordova build android

ANDROID_HOME=/Users/fxp/Library/Android/sdk

JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home

Reading build config file: /Users/fxp/Desktop/trunk1/build.json

Error: Could not find gradle wrapper within Android SDK. Might need to update your Android SDK.

Looked here: /Users/fxp/Library/Android/sdk/tools/templates/gradle/wrapper


根据提示,执行命令:

[plain]  view plain  copy
  1. cd  /Users/fxp/Library/Android/sdk/tools/templates/gradle/wrapper  

http://www.androiddevtools.cn下载了SDK Tools,下载解压后,将templates文件夹复制到sdk的tools目录下,再次执行cordova命令就不再报此错误了


错误三:Install the Android build tools version 19.1.0

  1. Download and install Android SDK for you platform. I'm on Mac so will present instructions from that perspective.
  2. Go to Configuration on login splash screen or Preferences through File or Apple menu.
  3. Go to Appearance and Behaviour > System Settings > Android SDK
  4. Observe the Android SDK Location. Mine is /Users/me/Library/Android/sdk
  5. Open ~/.profile
  6. Add export ANDROID_HOME=/Users/me/Library/Android/sdk
  7. Add export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
  8. Save and source ~/.profile

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值