0

My .bash_profile looks like this

export PATH=$PATH:/Users/subbarao/Library/Android/sdk/platform-tools/
export ANDROID_HOME=/Users/subbarao/Library/Android/sdk/
export PATH=$ANDROID_HOME/platform-tools:$PATH
export PATH=$ANDROID_HOME/tools:$PATH
even $(user/libexec/path_helper -s)

When I give ionic platform add android I am getting like this img

When I give ionic run android I am running into this error

Error: Could not find gradle wrapper within Android SDK. Might need to update your Android SDK. Looked here: /Users/subbarao/Library/Android/sdk/tools/templates/gradle/wrapper

PEHLAJ
  • 9,980
  • 9
  • 41
  • 53
Mohan Gopi
  • 7,606
  • 17
  • 66
  • 117

2 Answers2

1

Update SDK and gradle version and then try following commands in the terminal

export ANDROID_HOME=/Applications/ADT/sdk 

PATH environment variable

export PATH=$PATH:$ANDROID_HOME/bin
PEHLAJ
  • 9,980
  • 9
  • 41
  • 53
1

You have cordova-android v 6.1.2. There was an issue with cordova-android. Check this answer.

Try

ionic platform add android@6.2.1

Or

ionic platform add android@latest

Update:

if you are using ionic cli v3, the command is

ionic cordova platform add android@latest
Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
  • for ios settup i am facing this issue any ideahttp://stackoverflow.com/questions/43680366/how-to-build-and-deploy-an-ios-api-file-in-real-device-using-mac @suraj – Mohan Gopi May 02 '17 at 10:18