replacing com.google.android.gms:play-services with google-play-services.jar

笑着哭i 提交于 2019-12-24 14:51:04

问题


I am building a google maps app on android using android studio When I released the first version of my app, no one was able to view the google maps as google play services must be installed on the devices by users ( I cant ask people to download that in each device) so I want to embed it into my app.

I have been searching for 4 days and no luck so far

I got that google-play-services.jar library can be added to the app and by that no need for the user to install play services

I am not sure if I should use google-play-services.jar or com.google.android.gms:play-services in my android studio app.

I read in other answers that I can use google-play-services.jar into my app so I can get Google Play Services ready without the need for user to install it.

in another said that com.google.android.gms:play-services is a must in the app!

Anyway has experience in this? Please advice.

Thanks


回答1:


google-play-services.jar will only interract with installed play services on the smartphone. You can't emmbed the play service application in your apk, there's nos sense.

For peoples who want to use your application, they need to download it by the play store or maybe they already have google music or google maps on their phone, so they have play services installed.

So just add google play services in your gradle file compile 'com.google.android.gms:play-services:(version)'



来源:https://stackoverflow.com/questions/30000786/replacing-com-google-android-gmsplay-services-with-google-play-services-jar

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!