问题
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
回答1:
Here's what to do:
- Set
android:versionCodeto 2,android:versionNameto 1.1 in the manifest. Clean project, build project. - Delete project from Eclipse workspace.
- Go to project folder via your OS's file explorer.
- Delete
project.properties, the LIKELY culprit. - Import the project again in Eclipse.
- Right-click on project -> Properties -> Android -> Set the target SDK to API level 16.
- Export as Android app as usual.
来源:https://stackoverflow.com/questions/12692431/why-does-the-android-version-code-and-version-name-keep-going-back-to-1-and-1-0