React-native-admob: Could not resolve all dependencies for configuration ':react-native-admob:_debugCompile'

Created on 10 Apr 2016  路  2Comments  路  Source: sbugert/react-native-admob

This error occurred when running cd android && ./gradlew installRelease from my app's base directory. Below is the full stack trace.

Lochlans-MacBook-Pro:appname loch$ cd android && ./gradlew installRelease

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> A problem occurred configuring project ':react-native-admob'.
   > Could not resolve all dependencies for configuration ':react-native-admob:_debugCompile'.
      > Could not find com.google.android.gms:play-services-ads:8.3.0.
        Searched in the following locations:
            file:/Users/loch/.m2/repository/com/google/android/gms/play-services-ads/8.3.0/play-services-ads-8.3.0.pom
            file:/Users/loch/.m2/repository/com/google/android/gms/play-services-ads/8.3.0/play-services-ads-8.3.0.jar
            https://jcenter.bintray.com/com/google/android/gms/play-services-ads/8.3.0/play-services-ads-8.3.0.pom
            https://jcenter.bintray.com/com/google/android/gms/play-services-ads/8.3.0/play-services-ads-8.3.0.jar
            file:/Users/loch/Documents/appname/node_modules/node_modules/react-native/android/com/google/android/gms/play-services-ads/8.3.0/play-services-ads-8.3.0.pom
            file:/Users/loch/Documents/appname/node_modules/node_modules/react-native/android/com/google/android/gms/play-services-ads/8.3.0/play-services-ads-8.3.0.jar
            file:/usr/local/opt/android-sdk/extras/android/m2repository/com/google/android/gms/play-services-ads/8.3.0/play-services-ads-8.3.0.pom
            file:/usr/local/opt/android-sdk/extras/android/m2repository/com/google/android/gms/play-services-ads/8.3.0/play-services-ads-8.3.0.jar
        Required by:
            TRN:react-native-admob:unspecified

Most helpful comment

This can only be done with Android Studio ?

All 2 comments

Open your android folder in Android Studio, and go to Tools > Android > Sync Project with Gradle files to ensure that the play services will be referenced correctly. I was then able to build from CLI as per usual.

This can only be done with Android Studio ?

Was this page helpful?
0 / 5 - 0 ratings