Search Issue Tracker

Fixed in 2021.2.X

Fixed in 2019.4.X, 2020.3.X



Found in







Issue ID




[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

- 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 "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

  1. Response avatar

    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

  2. Response avatar

    Resolution Note (fix version 2020.3):

    Fixed in 2020.3.28f1

  3. Response avatar

    Resolution Note (fix version 2019.4):

    Fixed in: 2019.4.36f1

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.