Publish an application Upgrade on Android Market not work
Hello,
I have already published a titanium application on Android Market and i try right now to upgrade it on market but the version of the application is always the same (1) in Android Manifest.xml whereas i change it to 1.1 and rebuild the apk with titanium… It's like the application version is hard coded in the AndroidManifest with "1".
Please is there a patch somewhere or someone to explain me how to change it ?
Thank you by advance.
Thomas
4 Answers
-
Accepted Answer
Go to your YourApp/build/android/ folder.
Make a copy of your AndroidManifest.xml.
Rename it to AndroidManifest.custom.xml.Change following lines:
android:versionCode="1"
android:versionName="1"to: android:versionCode="2" // A number higher than the one above
android:versionName="1.1" // Version number to showLeave both files and recompile and zipalign.
This works with me. -
why does TI this not automatically?
-
Thank you very much for your answer i use it to update my application and it's works well.
Anyhow i modified the file mobilesdk/[os]/[version]/android/builder.py and add the following lines to do it automatically:
# Titanium native code here... manifest_contents = manifest_contents.replace('<!-- TI_PERMISSIONS -->',permissions_required_xml) manifest_contents = manifest_contents.replace('<uses-sdk android:minSdkVersion="4" />', '<uses-sdk android:minSdkVersion="%s" />' % android_sdk_version) # Custom code to manage version match_version = re.search('android:versionCode="(d)"', manifest_contents) version_code = None if match_version != None: version_code = int(match_version.group(1))+1 print("VersionCode=%s" % version_code) print("VersionName=%s" % tiapp.properties['version']) manifest_contents = manifest_contents.replace('android:versionCode="1"', 'android:versionCode="%s"' % str(version_code)) manifest_contents = manifest_contents.replace('android:versionName="1"', 'android:versionName="%s"' % tiapp.properties['version'])
If it can help someone.
Thomas
-
I have set versionName and versionNumber higher in new apk compare to my previous apk in AndroidManifest and AndroidManifest.custom file.Now version is gets higher compare to previous version but on device i have to first uninstall my previous apk [lower version] and then install new apk [higher version] then its work like charm.So my question is that 'On each time i have to uninstall my previous apk??' Please help me out.