cowbell / ionic-geofence

Ionic geofence app example
MIT License
180 stars 92 forks source link

ionic run android fails #28

Closed fnokeke closed 7 years ago

fnokeke commented 7 years ago

Hi,

Thank you for the nice work you have here. So I cloned the repo and after npm install, I tried ionic serve, which works fine. However ionic run android shows error below.

I thought this was an issue with play services so I installed both Google Play Services and Google Repository. Unfortunately, the error still persists.

Any help will be appreciated. Thanks

A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':_debugCompile'.
   > Could not find com.android.support:support-v4:24.0.0.
     Searched in the following locations:
         https://repo1.maven.org/maven2/com/android/support/support-v4/24.0.0/support-v4-24.0.0.pom
         https://repo1.maven.org/maven2/com/android/support/support-v4/24.0.0/support-v4-24.0.0.aar
         https://jcenter.bintray.com/com/android/support/support-v4/24.0.0/support-v4-24.0.0.pom
         https://jcenter.bintray.com/com/android/support/support-v4/24.0.0/support-v4-24.0.0.aar
         file:/usr/local/Cellar/android-sdk/24.3.4/extras/android/m2repository/com/android/support/support-v4/24.0.0/support-v4-24.0.0.pom
         file:/usr/local/Cellar/android-sdk/24.3.4/extras/android/m2repository/com/android/support/support-v4/24.0.0/support-v4-24.0.0.aar
         file:/usr/local/Cellar/android-sdk/24.3.4/extras/google/m2repository/com/android/support/support-v4/24.0.0/support-v4-24.0.0.pom
         file:/usr/local/Cellar/android-sdk/24.3.4/extras/google/m2repository/com/android/support/support-v4/24.0.0/support-v4-24.0.0.aar
     Required by:
         :android:unspecified > com.google.android.gms:play-services-location:9.6.1 > com.google.android.gms:play-services-basement:9.6.1
AparnaMylavarapu commented 7 years ago

Hi, I am also facing the same issue.Did you find any solution?please share.Thank you

fnokeke commented 7 years ago

I resolved this by removing all installations of android and reinstalling it -- somehow, I had android installed in different places and updating Google Play Services & Google Repositories was not updating the active android directory. For instance, if I had android installed in dir A and dir B then my Google Play Services updates were in dir A even though my current/active android path was dir B.

Hope this helps.

AparnaMylavarapu commented 7 years ago

Thank you..I have solved it by uninstalling and installing the android platform in the project.