updating an apk

Monkey Targets Forums/Android/updating an apk

dave.h(Posted 2013) [#1]
im getting this when i try to upload an updated apk

You uploaded an APK that is signed with a different certificate to your previous APKs. You must use the same certificate

not really sure what ive done wrong.ive changed the stuff below

android:versionCode="2"
android:versionName="1.1"

the package name is the same so im not sure what im doing wrong.any ideas?


Zurrr(Posted 2013) [#2]
android:versionCode="2"
android:versionName="1.1"

That's not the reason. Update allow android version to be change!

The problem is your signing key. You must sign with the same key again.


Xaron(Posted 2013) [#3]
And if you don't have that previous key anymore there is NO way to update the apk. You have to upload a new one with a different bundle identifier and which will appear as a new app of course.


Midimaster(Posted 2013) [#4]
Three days ago somebody offered a *.BAT script, that prepairs apks in one step. At this moment I thought, that this problem could happen now....

Each apk needs a KEY for signing it. But you create this KEY only once at the birth of a new project. Every update or new compilation you have to use the same KEY.

The creation process of a apk need three steps:

1. Creating the KEY
2. Signing the Apk
3. Zip-Alinging the apk

Do Step 1 only once in its life.
And steps 2 and 3 each update.

For those who speak german too, there is a very complete step by step manual in the german forum:

http://www.blitzforum.de/forum/viewtopic.php?t=39374


Xaron(Posted 2013) [#5]
Or here: http://www.monkeycoder.de/community/index.php?threads/how-to-wie-man-eine-app-in-den-store-bekommt.2920/

(as you mentioned the german forum. :P ) => look at the upper left german flag ;)


dave.h(Posted 2013) [#6]
ok so i used therevels way of signing my app which is listed below

1. Sign up to Android Market Deveoper Console
2. Create your game :)
3. Compile for Android
4. Create your icons as stated by dave.h
5. Alter the APP_LABEL, APP_PACAKGE and SCREEN_ORIENTATION in the CONFIG.TXT
6. Compile for Android again
7. Find your apk file (yourproject.build/android/bin), open it using WinRAR and delete the META-INF folder (this is where the debug key is stored)
8. Create the key for your app:
8a. Create a folder called "keytools" and make a folder in that called "keys"
8b. Open command prompt (cmd.exe)
8c. Navigate to your keytools folder
8d. Type the following:
c:\"Program Files (x86)"\Java\jdk1.6.0_39\bin\keytool -genkey -alias test.keystore -keyalg RSA -validity 20000 -keystore keys/test.keystore

8e. Answer the questions prompted.
8f. Sign the apk:
c:\"Program Files (x86)"\Java\jdk1.6.0_39\bin\jarsigner -verbose -keystore keys/test.keystore -signedjar test-signed.apk test.apk test.keystore -digestalg SHA1 -sigalg MD5withRSA

8g. Zip align the apk:
C:\"Program Files (x86)"\Android\android-sdk\sdk\tools\zipalign -v 4 test-signed.apk test-signed-zipped.apk

9. In the Android Developer Console, click Upload Application
10. Fill out and upload details, screen shots and your signed and aligned apk



this created a file called

test.keystore

which i assume is what i now need.how do i use this now to update my app or am i better off using eclipse.I havent used eclipse but if its a better way i will download it and learn how to use it.


ElectricBoogaloo(Posted 2013) [#7]
Backup, backup, backup, backup, and for god's sake, backup!!!
My experience of GooglePlay has NOT been a happy one.
I currently have 4 "published-turned out borked-unpublished" apps in my store, which I have absolutely NO way to remove. They're just going to sit there, broken, forever.
Stupid stupid stupid stupid stupid.

Considering how GooglePlay is meant to be the "Easier" alternative to iOS dev, it's wound me up, no end.
There are some good things that come from the freeform nature of Android dev, but freeform, willy-nilly, signature signing is definitely not one of them.


Tibit(Posted 2013) [#8]
Haha, I agree :)