Search code examples
androidandroid-manifestandroid-version

Why does the Android version code and version name keep going back to 1 and 1.0?


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


Solution

  • 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.