Search Issue Tracker
Fixed in 2021.2.X
Fixed in 2019.4.X, 2020.3.X
Votes
0
Found in
2018.4
2019.4
2020.2
2020.2.1f1
2021.1
2021.2
Issue ID
1307476
Regression
No
[Android] Gradle build fails when the Bundle Version Code value is lower than 1
How to reproduce:
1. Create a new project
2. Make sure the Android platform is selected in the Build Settings
3. Navigate to the Project Settings > Player > Other Settings > Identification
4. Use the value slider to change the value to anything below 1
Expected result: The value slider will not allow to select a value below 1
Actual result: The value slider allows to select a value below 1
Reproducible with: 2018.4.31f1, 2019.4.19f1, 2020.2.3f1, 2021.1.0b4, 2021.2.0a3
Notes:
- Selecting a value below 1 (0 included) and building the project to Android results in a Gradle build fail
- One of the Console error's snippet: "A problem occurred evaluating root project 'gradleOut'. Cannot invoke method minus() on null object"
- According to the documentation https://docs.unity3d.com/Manual/class-PlayerSettingsAndroid.html#Identification "The value must be set as an integer, such as “100”. You can define it however you want, as long as each successive version has a higher number." meaning that a random negative integer should work when selected
- This should either result in being able to set only positive values or being able to build without the error when using negative integers (and with neutral integer 0)
- This Gradle error seems to happen at the end of the project build, resulting in some time being wasted
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Fixing Message Loss in UMPE During Domain Reload
- The Editor freezes when ScheduleReadOnly of IJobParallelForTransform with dependency is used
- Text is truncated in the Inspector when the display scale is set to 150%
- CancellationTokenSource(<timeout>) has incorrect cancellation status when used in WebGL Player
- VFX property value names are cut off when properties with 'Arc' are viewed in the VFX Blackboard
Resolution Note (fix version 2021.2):
Has been fixed in 2021.2.0a4 and above. Now the Bundle Version Code values are clamped to values greater than 0
Resolution Note (fix version 2020.3):
Fixed in 2020.3.28f1
Resolution Note (fix version 2019.4):
Fixed in: 2019.4.36f1