Getting Error When Trying to create APK & Bundle

heres the error i keep gettting when ever i go to export as an apk or bundle

Error:
FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring project ‘:app’.

40232903: android.defaultConfig.versionCode is set to 0, but it should be a positive integer.
See Version your app  |  Android Developers for more information.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 35s
Command failed with exit code 1: /worker/app-b9fe9e39-8db1-4f4b-8cec-12c58198ff69/platforms/android/gradlew cdvBuildRelease -b /worker/app-b9fe9e39-8db1-4f4b-8cec-12c58198ff69/platforms/android/build.gradle

Did you try to do as the error message says and put a positive integer as your game version?

Try this go to Preferences into GD and add some numbers like versioning 1.0.0 or 1.0.0.0


Don’t forget that the package name must be the same as in your Google Play profile