3

Is it possible to update my app after changing the Google Play service library in the build.gradle?

I changed it from:
compile 'com.google.android.gms:play-services:8.3.0'
to
compile 'com.google.android.gms:play-services-ads:8.4.0'

After changing the Play Service version, and installing on my phone, android studio gave me a warning saying that I can't update the existing application, and I must uninstall it. So, can I still release the new APK in the developer console, and will it cause issues?

4
  • 3
    You changed play-services to play-services-ads? Jan 28, 2016 at 3:57
  • It doesn't seem like Play Service issue. Was your existing application also compiled in debug mode on the same computer?
    – Sharjeel
    Jan 28, 2016 at 4:04
  • @Sharj I'm not sure... I make it release mode when making my new updated apk, so will it work? Jan 28, 2016 at 4:12
  • You can only update installed application if it's signed with the same key. See my answer.
    – Sharjeel
    Jan 28, 2016 at 4:17

3 Answers 3

2

After changing the Play Service version, and installing on my phone, android studio gave me a warning saying that I can't update the existing application, and I must uninstall it.

its give you warning because in you device you have signed APK and you are trying to update it using debug apk. so generate signed apk(with same certificate whatever you have used previously) then update app in device.

So, can I still release the new APK in the developer console, and will it cause issues?

in above process there is no issue then you can upload same signed apk on Google Play Store


assume you know what is signed & debug apk and how to generate both


EDITED:

Gradle is a build system. i am not able to explain it in simple way but you can read more detail of Gradle in this answer and for more about build system and Build System Overview

2
  • Hey, what is the build.gradle file? Jan 28, 2016 at 6:15
  • Why are there two grade files? Also, what's a dependency? Jan 29, 2016 at 6:00
0

I suspect that what happened here is that your signing key doesn't match. (I.E. if you downloaded your release-key version from the Play store while using the debug key with Android Studio) Changing Play Services should not have this impact.

1
  • Ok, so will the update go fine? Because I make it release mode when making my new updates apk.... Jan 28, 2016 at 4:11
0

You can only update your application to the Play Store if it's signed by the same old key that you used for signing the application first time.

As you probably already know, when you compile application to run on your device for testing, it's signed with the debug key.

If you already have your application installed on your phone that's signed with production key and you try to re-install application that's signed with debug key then it will not work. You will first have to uninstall old application and then reinstall.

To sum it up, you can only release new version if you sign your application with the old production key that you have. In this case, application will be updated on users phone without them uninstall your old application.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.