it will use the property . not change it at all . ( the result will be versionCode=1 versionName=1.1)
============
it also happen in my Gradle template. previously i don’t need to set minSdkVersion in defaultConfig. but it 2018 version , if not set minSdkVersion, it will set as
We’re using 2018.4.18f1, The mainTemplate.gradle for this version doesn’t contain versionCode & versionName in defaultConfig Section. When building it doesn’t seems to be changing the versionCode & versionName in AndroidManifest.xml. Causing it be blank in generated builds.
I thought LTS branch was meant to be stable? You can’t just replace the Android build system on a release branch that’s not meant to have any new features.
Same issue for me as @ (I think, using the LTS 2017.4.18f1). I can no longer upload new versions of my sdk because the version code is always set to 1 by unity, regardless of what I set in Player Settings.
@Yury-Habets Yes. I have a 2018 project that I copied them from assuming that would fix the issue but it didn’t. The issue exists whether you include those lines in the gradle file or not
I get that. I’m not suggesting you intentionally broke the LTS branch but what I’m saying is that upgrading the gradle version - even if it worked, required me to regenerate my gradle script which was not communicated at all and cost me many hours of dev time to work out why my Android builds were failing. My understanding was that LTS would not introduce new features for this very reason.
If nothing else, please consider making upgrade instructions more visible when upgrading to a newer version of Unity.
Dang, I just ran into this after upgrading to 2017.4.19f1 that was just released. Can you please add this in BOLD in the release notes that this is a know breaking issue?
Is there a work-around fix for this bug? For example, can we edit the default gradle template and add the appropriate lines to make sure the versionCode and versionName get set?
Hi everyone,
I had no time to wait for 2017.4.20f1, and I had to make temporary solution.
It totally works for me and I hope it helps you too.
I had the same problems as you guys. All of them:
versionCode,
versionName,
platformBuildVersionCode,
platformBuildVersionName,
and also with signature
[INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.xxx.yyy signatures do not match the previously installed version; ignoring!]
First of all, I analyzed the changes that gradle makes incorrectly in the mainTemplate.gradle file.
I found out that the versionCode, versionName, storePassword and keyPassword parameters were filled with empty values.
So, my solution is to populate these parameters from code instead of Unity.
You are absolutely right, we are not machines and any person is prone to err.
The fact of the mistake is not a claim. It just happened.
Again, you are professionals and I have no doubt about that.
I am saddened by the reaction to error messages.
For example, as a system user, I expect to be told how to resolve the issue as soon as possible. As a workaround, until the patch version is released.