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

Gradle build error when nativescript-google-maps-sdk is added #250

Closed
lukashlobil opened this issue Jan 2, 2017 · 9 comments
Closed

Gradle build error when nativescript-google-maps-sdk is added #250

lukashlobil opened this issue Jan 2, 2017 · 9 comments
Assignees
Milestone

Comments

@lukashlobil
Copy link

Hi,
I have the same issue as some have had before me.
While trying to run the app I get

Script .../platforms/android/configurations/nativescript-plugin-firebase/include.gradle' line: 43
Failed to apply plugin [id 'com.google.gms.google-services']
For input string: "+"

The video tutorial talks about build.gradle, which I guess is deprecated now.

I am also using dapriett's google-maps-sdk plugin, which works fine - I haven't specified google services' version there.

I tried fiddling with the ext property in app.gradle and also tried hardcoding the version in include.gradle of your plugin.

I have updated my android dependencies using android update sdk and checked - I have the last versions.

Does someone have some pointers to help me out please?

@EddyVerbruggen
Copy link
Owner

I'd like to help but I need your entire project to figure it out.

@lukashlobil
Copy link
Author

lukashlobil commented Jan 2, 2017

Hi Eddie,
I forked your demo repo (runs fine), typed

tns plugin add nativescript-google-maps-sdk

and immediately I am getting the error.

So it seems it is interaction of the two plugins. I checked this issue, but nothing there helps me.

Now I am able to run your plugin or his plugin, but not together. You can see the code on the forked repo, although I just installed the other plugin.

I have noticed, right after merging dex messages I am getting these:

Skip com.google.android.gms.internal.zzt
Error: java.lang.NullPointerException
Skip com.google.android.gms.internal.zzw
Error: java.lang.NullPointerException
Skip com.google.android.gms.internal.zzy
Error: java.lang.NullPointerException
Skip com.google.android.gms.internal.zzz
Error: java.lang.NullPointerException

( it happens everytime, but everything worked, so I paid no attention to it). I apologize in advance if it's only my machine...

Might be related to this issue.

@EddyVerbruggen
Copy link
Owner

Hi, thanks for those details! I will do the same and let you know what the results are on my machine.

@EddyVerbruggen EddyVerbruggen changed the title Google services (yet again) Gradle build error when nativescript-google-maps-sdk is added Jan 2, 2017
@EddyVerbruggen EddyVerbruggen self-assigned this Jan 2, 2017
@EddyVerbruggen EddyVerbruggen added this to the 3.9.0 milestone Jan 2, 2017
@EddyVerbruggen
Copy link
Owner

Luckily, same issue on my machine so I'll try and figure this out soon.

@EddyVerbruggen
Copy link
Owner

EddyVerbruggen commented Jan 2, 2017

Can you try something to make these two work together? We may need to tell the project which version of play services we want to use.

Open app/App_Resources/Android/app.gradle and add:

android {  
  // other stuff here
  project.ext {
    googlePlayServicesVersion = "9.8.+"
  }
}

@lukashlobil
Copy link
Author

Thanks Eddy, that fixed it right away!

@EddyVerbruggen
Copy link
Owner

Awesome, added that info to the readme as I don't think a plugin should try to automate that.

@phatakrajan
Copy link

phatakrajan commented Mar 16, 2018

I am facing exactly same issue but the resolution of adding

android {
// other stuff here
project.ext {
googlePlayServicesVersion = "9.8.+"
}
}
is not helping. I get following issue after that

Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 9.8.+.

I tried with different versions is 11.0, 9.8 etc. How to identify rootcause and fix this issue?

@edyrkaj
Copy link

edyrkaj commented Nov 10, 2018

hi @EddyVerbruggen, using
"tns-android": { "version": "5.0.0" }

tns build android failed
Command ./gradlew failed with exit code 1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants