5

I am attempting to deploy my first app to the Google Play Store. Each time I upload the APK file, I get the following message:

"Upload failed You uploaded a debuggable APK. For security reasons you need to disable debugging before it can be published in Google Play. Learn more about debuggable APKs."

I am building a release version of my code. I upload the release version of my APK file from:

\Projects\MyAppNameHere\Android\Release\MyAppNameHere\bin\MyAppNameHere.apk

In my Projects Debugging options, it is set to "No Debug information"

I have also modified the AndroidManifest file to say:

android:debuggable="False"

However, the Google Play Store keeps giving me the same message that i need to upload a non-debuggable version.

What Am I doing wrong? I should note, every time I build a new release version of the APK file, the AndroidManifest file reverses back to

android:debuggable="True"
JakeSays
  • 2,048
  • 8
  • 29
  • 43
  • 2
    Are you still signing it with your debug key? Have you followed all of the steps [here](http://docwiki.embarcadero.com/RADStudio/XE7/en/Deploying_Your_Signed_Android_Application), including selecting the *Application Store Platform* and completing the *Provisioning* page (which signs it with a release key that you must obtain from Google Play) and then using the *Deploy* button from that *Provisioning* page? – Ken White Mar 18 '15 at 14:05
  • 1
    Hi Ken, i just found another source - i was doing all th above, except - "Deploy button from that Provisioning page" - I will give that a try – JakeSays Mar 18 '15 at 14:28
  • 1
    @KenWhite, there is no Deploy button on Provisioning page in Delphi XE-7 - at least not on my Project Options – JakeSays Mar 18 '15 at 14:33
  • Projects\delpoyment\ - then deploy button? – JakeSays Mar 18 '15 at 14:41
  • 1
    That's what step #5 on the page I linked says: *Select Project>Deployment, and click the **Deploy** button to deploy your application.*, but step #4 is just as important (see the note about the keystore file and certificate, which must be your *release* certificate and file, not the default *debug* cert and file). The *Deploy* button is the fifth from the left on the toolbar on the Deployment page. – Ken White Mar 18 '15 at 14:49
  • @KenWhite - Went through all those steps – JakeSays Mar 18 '15 at 14:52
  • 1
    Then you missed something, or you're using the wrong certificate to sign the app. I can't troubleshoot it for you from here, because I have no access to your application, certificate and keystore file, source code, or Google Play account. There are other apps successfully deployed to Google Play from XE7. Have you followed **every link** on that documentation page related to building a release version and deployment? There are quite a few, and many of those link to other topics. You're missing a step somewhere. – Ken White Mar 18 '15 at 14:55
  • @KenWhite Yes, followed all steps on wiki page. Here are two screenshots www.delphibyexample.com/projects/screenshot1.png and www.delphibyexample.com/projects/screenshot2.png – JakeSays Mar 18 '15 at 15:03
  • I had to hand edit the manifest file to change android:debuggable="False", (DO NOT COMPILE OR BUILD) , then do a deploy, and it worked! Not sure why i have to hand edit it. What step I have done wrong that the file doesn't get changed automatically when deploying? But it worked – JakeSays Mar 18 '15 at 15:13

1 Answers1

6

There are two types of certificates for signing your app:

  • Debug certificate: to connect a debugger to your application, to be able to access your apps's private data directory
  • Release certificate: to upload your app to an application store (like Google Play)

Delphi puts a debug certificate for you on your PC so you can start developing & debug your apps.

It even uses this certificate if you compile with a release profile when you forgot to create your own certificate.

So make sure that

  • Your build configuration is set to "release"
    enter image description here
  • Your Target Plattform configuration is "Application-Store"
    enter image description here
  • You have provided an own certificate for this configuration in Project -> Options -> Deployment (make sure your profile is Release Configuration - Android Platform)
    enter image description here

If you do not have a release certificate you can create a new certificate within a key store through the options dialog. Remember to always use the same release certificate for your app, and to store your key store in a secure place that no other person has access to it. Once you lost that certificate, you will not be able to publish updates of your app anymore!

If you like to install your release app on a device that already has installed a debug version of your app, you have to uninstall it first.

If you like to verify what certificate an .apk is signed with you can use the command

jarsigner -verify -verbose -certs %file_name%
Abdullah Ilgaz
  • 719
  • 1
  • 17
  • 39
dominikkv
  • 216
  • 3
  • 13
  • 1
    yes, i have don all this and it is working now, however, I still needed to manually edit the manifest file. I have chosen your answer bacause you explain it nicely for the next person – JakeSays Mar 18 '15 at 23:52
  • I have a question. Do I need a Google Developer account to create a keystore code or what? Like let's say I don't have a developer account yet. Will I still be able to get my app completely ready for publishing to the store? – Shaun Roselt Oct 24 '16 at 21:47
  • 1
    @ShaunRoselt you do not need a Google Developer account to sign your app or to create the keystore, but if you want to publish your app on the Google PlayStore, or if you like to use special APIs from the Google Play Services, you do need an account. – dominikkv Oct 26 '16 at 12:02
  • Selecting the `Application store` build type under `configuration` in the right hand side tree pane (by double clicking) was more important for me since when i selected the same from project > options , it kept falling back to `Application Development` mysteriously. – user30478 Jun 04 '21 at 14:46