Can I add Google Play Services to already published app? [closed]

浪尽此生 提交于 2019-12-12 03:36:11

问题


My game is published and live on Google Play. But in the next update I want to add Play Services. Is this possible, because I read that I have to publish the Play Services first and then the game. If it's possible can you give me detailed instructions, because I tried once and screwed the things.


回答1:


You will have to go back to your source code, add the Google Play Services and build another APK. After that re-upload it to Google Play again, say version 2. The instruction to add Google Play Services to your project is stated in the Add Google Play Services to Your Project:

To make the Google Play services APIs available to your app:

Open the build.gradle file inside your application module directory. Note: Android Studio projects contain a top-level build.gradle file and a build.gradle file for each module. Be sure to edit the file for your application module. See Building Your Project with Gradle for more information about Gradle. Add a new build rule under dependencies for the latest version of play-services. For example: apply plugin: 'com.android.application' ...

dependencies {
    compile 'com.google.android.gms:play-services:10.0.1'
}

Be sure you update this version number each time Google Play services is updated. Check the docs for more info.



来源:https://stackoverflow.com/questions/41792941/can-i-add-google-play-services-to-already-published-app

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