3

I'm trying to publish my app to the Play Store but whenever I export the app as an Android application, my version code and version names get reverted to "1" and "1.0" respectively. I am simply following the instructions here: How Do I Create A Certificate For My Android Market APK?

I don't understand what is going on. I'm trying to make it 2 and 1.1.

UPDATE: Here's a YouTube video of the error in action: http://www.youtube.com/watch?v=cLMf0iqpbIg&feature=youtu.be

Community
  • 1
  • 1
Matthew Quiros
  • 13,385
  • 12
  • 87
  • 132
  • Have you changed it correctly on your manifest? – WarrenFaith Oct 02 '12 at 14:39
  • Yes. I simply replace the `android:versionCode` and `android:versionName` values. Then, when I click on the Finish button in the last dialog for exporting it as an Android app, I notice how the manifest is changed back to 1 and 1.0. I wonder if this has anything to do with using the same keystore? – Matthew Quiros Oct 02 '12 at 14:41
  • may be some silly mistake,first delete your old apk and try to create new. – MAC Oct 02 '12 at 14:44
  • The old exported `.apk`, you mean? I did that for every one of my tries for the past hour. Or the one in `/bin`? – Matthew Quiros Oct 02 '12 at 14:46
  • Are you creating a new certificate each time you want to publish your app? If so, that might be the problem. (I don't remember if Android Market will let you do that though) – Vincent Mimoun-Prat Oct 02 '12 at 14:57
  • No. I'm using the old one. However, I did move it to some folder. But I did change the path in the text field during the exporting process. I'm not so sure though if the alias is keeping track. Also, there are no errors thrown during .apk generation. I'll record a video of it. – Matthew Quiros Oct 02 '12 at 15:00
  • Here's a YouTube video of the error in action: http://www.youtube.com/watch?v=cLMf0iqpbIg&feature=youtu.be – Matthew Quiros Oct 02 '12 at 15:47
  • Once you have changed your version code and name in the Manifest. Try running it the simulator (make sure you have deleted any previous installs). Once this is done, go into your setting and check to see you version code matches up (in your case it shoulod display 1.1). – SingleWave Games Oct 02 '12 at 16:23
  • I don't understand, even though its version code and name are already 2 and 1.1 in the manifest, it still shows as 1.0 in the Settings. Also, I tried exporting it again and the same thing happens--it returns to 1 and 1.0. – Matthew Quiros Oct 03 '12 at 06:38

1 Answers1

3

Here's what to do:

  1. Set android:versionCode to 2, android:versionName to 1.1 in the manifest. Clean project, build project.
  2. Delete project from Eclipse workspace.
  3. Go to project folder via your OS's file explorer.
  4. Delete project.properties, the LIKELY culprit.
  5. Import the project again in Eclipse.
  6. Right-click on project -> Properties -> Android -> Set the target SDK to API level 16.
  7. Export as Android app as usual.
Matthew Quiros
  • 13,385
  • 12
  • 87
  • 132