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
- Log shader compilation does not give info on which shader instance had a variant compiled
- Label text overflows its rect when resizing the Game view in Free Aspect
- UI Toolkit Slider value defaults to min value when the initial value is set in the UXML file
- The Player hangs when unloading a scene using the UnloadUnusedAssets() method
- [iOS] Too many texture parameters error is thrown when running on devices that support the number of parameters
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