Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit ab6147b

Browse files
Gradle build error when nativescript-google-maps-sdk is added #250
1 parent 18d6ab0 commit ab6147b

File tree

4 files changed

+22
-6
lines changed

4 files changed

+22
-6
lines changed

README.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,16 +187,32 @@ placing `google-services.json` to `platforms/android/google-services.json` (see
187187
the changes to `build.gradle` which are mentioned above as well.
188188

189189
#### Could not find com.google...
190-
And there's this one: "Could not find com.google.firebase:firebase-auth:9.4.0". That means
190+
And there's this one: "Could not find com.google.firebase:firebase-auth:10.0.+". That means
191191
making sure you have the latest `Google Repository` bits installed.
192192
Just run `android` from a command prompt and install any pending updates.
193193

194-
Also, an error like "Could not find com.google.firebase:firebase-core:9.0.0" can be caused by having
194+
Also, an error like "Could not find com.google.firebase:firebase-core:10.0.0" can be caused by having
195195
more than one version of the Android SDK installed. Make sure ANDROID_HOME is set to the Android SDK directory
196196
that is being updated otherwise it will seem as though your updates have no effect.
197197

198-
#### Found play-services:9.0.0, but version 9.X.Y is needed..
198+
#### Found play-services:9.0.0, but version 10.X.Y is needed..
199199
Update your Android bits like the issue above and reinstall the android platform in your project.
200200

201+
#### `include.gradle`: Failed to apply plugin .. For input string: "+"
202+
You probably have another plugin depending on Google Play Services (Google Maps, perhaps).
203+
We need to pin to a specific play services version to play nice with others, so open `app/App_Resources/Android/app.gradle` and add:
204+
205+
```
206+
android {
207+
// other stuff here
208+
209+
project.ext {
210+
googlePlayServicesVersion = "10.0.+"
211+
}
212+
}
213+
```
214+
215+
Where `"10.0.+"` is best set to the same value as the version on [this line](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/blob/master/platforms/android/include.gradle#L23).
216+
201217
## Credits
202218
The starting point for this plugin was [this great Gist](https://gist.github.com/jbristowe/c89a7bcae7fc9a035ee7) by [John Bristowe](https://github.com/jbristowe).

platforms/android/include.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ dependencies {
3636
// compile "com.facebook.android:facebook-android-sdk:4.+"
3737

3838
// Uncomment if you need Google Sign-In Authentication
39-
// compile "com.google.android.gms:play-services-auth:10.0.+"
39+
// compile "com.google.android.gms:play-services-auth:$googlePlayServicesVersion"
4040

4141
}
4242

scripts/installer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ dependencies {
267267
` + (isSelected(result.facebook_auth) ? `` : `//`) + ` compile "com.facebook.android:facebook-android-sdk:4.+"
268268
269269
// Uncomment if you need Google Sign-In Authentication
270-
` + (isSelected(result.google_auth) ? `` : `//`) + ` compile "com.google.android.gms:play-services-auth:10.0.+"
270+
` + (isSelected(result.google_auth) ? `` : `//`) + ` compile "com.google.android.gms:play-services-auth:$googlePlayServicesVersion"
271271
272272
}
273273

scripts/postinstall.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3063,7 +3063,7 @@ dependencies {
30633063
` + (isSelected(result.facebook_auth) ? `` : `//`) + ` compile "com.facebook.android:facebook-android-sdk:4.+"
30643064
30653065
// Uncomment if you need Google Sign-In Authentication
3066-
` + (isSelected(result.google_auth) ? `` : `//`) + ` compile "com.google.android.gms:play-services-auth:10.0.+"
3066+
` + (isSelected(result.google_auth) ? `` : `//`) + ` compile "com.google.android.gms:play-services-auth:$googlePlayServicesVersion"
30673067
30683068
}
30693069

0 commit comments

Comments
 (0)