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

Question: Can we remove google play service as dependency for android? #52

Closed
shripalsoni04 opened this issue Jun 12, 2016 · 3 comments
Closed

Comments

@shripalsoni04
Copy link
Contributor

shripalsoni04 commented Jun 12, 2016

First of all 馃憤 for this very useful plugin.

I noticed that, full library of google play service is included as dependency in platforms/android/include.gradlefile and due to this, the compile time is getting increased of the app and getting error of DexIndexOverflowException. (I know we have solution now of adding multiDexEnabled true)

I tried to compile the project after removing compile "com.google.android.gms:play-services:9.0.0" from include.gradle (after removing android platform and then re-adding android platform), and the firebase functionalities are working without any issue.

So my question is, do we require full library of google play service as dependency in our app and if we require it, can we add only the required google play service api as dependency to reduce compile time?

You can check all the apis of google play service from here: https://developers.google.com/android/guides/setup#add_google_play_services_to_your_project

@a-v-zheng
Copy link

original idea! May be fetch() and http.getJSON() methods will work in this case? #42

@shripalsoni04
Copy link
Contributor Author

shripalsoni04 commented Jun 12, 2016

@zhengiko I don't know whether it is related to this or not, but I tried to copy the code of fetch() and http.getJSON() mentioned at #42 in my project which doesn't have dependency com.google.android.gms:play-services:9.0.0 included. Both the code are logging proper JSON data on console while testing on my android phone.

@EddyVerbruggen
Copy link
Owner

The play services lib is required for reading google-services.json which contains the Firebase configuration. I previously included the entire library (as documented by Firebase), but I found out that we only need the 'core' bit by default as can be seen here.

Perhaps you were able to compile without it because you didn't remove and re-add the Android platform afterwards?

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

No branches or pull requests

3 participants