Awesome, that got it working!
Thanks uapo15 for posting your build.settings file. I guess I had a goofy comma missing or something.
Here is my build.settings file. Even with this I cannot upload my app the the Android Market because of the versionCode error.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
| settings =
{
orientation =
{
default = "landscapeRight",
supported =
{
"landscapeRight", "landscapeLeft"
},
},
android =
{
versionCode = "1"
},
iphone =
{
plist =
{
UIStatusBarHidden=true,
UIPrerenderedIcon = true
},
}
} |
That is very strange. I dont see any problems in build.settings.
If you cant get it working, you could try to edit manifest after building. That should work.
Well, if editing the manifest is my last bet, would anyone be willing to use remote desktop to get it working on my pc?
I cannot for the life of me get my Manifest extracted. All I get is gibberish.
I would like to mention that you guys have been quick to respond and very helpful.
cullenjweb - Sorry, just want to clarify, did use the apktool and follow uapo15's directions in the above post http://developer.anscamobile.com/forum/2011/07/15/versioncode-error#comment-46027 on how to decompile your apk FIRST before trying to edit the manifest?
It sounds like you are trying to edit the manifest directly, prior to using the apktool. If you change the apk to a zip you can see the file structure but when you try and edit the manifest it's garbled. You must decompile it in order to edit it.
The steps are (I am using my actual command lines below, with my file/keystore names, replace with the name for your own app):
1. decompile the apk using the apktool command line looks like this "apktool d RedneckJellyfish.apk RedneckJellyfish
2. go into the folder that the apktool just created and edit the line in the manifest so that it reads something like this:
3. then recompile using apktool "apktool b RedneckJellyfish RedneckJellyfish_new.apk"
4. then resign your app using the jarsigner (comes with android SDK) "jarsigner -verbose -keystore mudstuffing.keystore
RedneckJellyfish_new.apk mykeyaliasname" where the keystore and the keystore alias is the same what you are using when you build in Corona
5. realign the apk file (this is optional) "zipalign -v 4 RedneckJellyfish_new.apk RedneckJellyfish_final.apk"
6. Submit the final version "RedneckJellyfish_final.apk" to the android market.
I follow the instructions which results with this in the cmd window. All I have in the output folder is a bunch of smali files.
Wierd... And zombieshooter.apk is in the same directory as apktool?
Sorry, I am not sure why it's not working.
Yes, it's the same directory. I get an output, but it's useless smali files.
cullenjwebb,
One possible thing wrong with your build.settings file is your line #27. I think it should have a comma after the brace. I say this because if you compare it to uapo15's posted file, he has a comma at the end of the brace on line #15.
The only other things I can think of is a typo in the filename "build.settings" or it's not in the correct folder (should be in the same place as main.lua).
Thanks for catching that. I have copied and pasted uapo's build.settings into my own and changed only the portrait to landscapeRight.
Shouldn't this make my app version appear as "1" and not "1.0" in manage applications? It's still showing up as "1.0".
VERSIONCODE is "1" and VERSIONNAME is "1.0". If it shows "1.0" in manage applications, it is right. You can not see VERSIONCODE in manage applications. Understant? :)
After countless days fixing one bug after another I finally figured out the problem. You need to use a Mac.
I got the JDK to work on my pc but the next thing you know the app does not install on my android device. If you fix one bug on a pc you end up having to fix a new bug and searching the forums to fix that new bug. Then the new bug creates problems with an old bug. It's just not worth the time to do these work arounds.
Using corona on a Mac to build android game apps will save you a ton of time and stop the agonizing pain of finding work arounds.
Thanks a bunch uapo15!
After copy-pasting your config.lua instead of mine it worked perfectly.
I would like to take the time, however, of suggesting a app for windows:
http://forum.xda-developers.com/showthread.php?t=890199
It works like a charm and lets your edit and decompile your app without any coding at all. It's flippin amazing.
Later!
I'm ran into the same problem, after having published two apps previously:
"Market requires versionCode to be set to a positive 32-bit integer in AndroidManifest.xml."
What is missleading is the error message: in AndroidManifest.xml. From my experienc, not true.
Add the versionCode to you build file, not your xml file. Of course, make sure all your version numbers are the same! Thanks to uapo15, that little bit of info helped.
M
Just a quick note. To use apk manager with the latest corona you need to update this file in the 'Other' folder:
http://www.mediafire.com/?f354aq5u71w5jp6
Apk manager actually uses apktool to do everything, however it also includes the android frameworks jar to verify the options you set in the manifest.
jayantv: the manifest is actually a java compressed xml, and you cant just edit it directly.
Thanks. I updated with the file provided here. The apk will now decompile, but it will not compile, so I am unable to change any manifest items.
Is that just me?