# IDX not picking up versionCode from pubspec.yaml file

**URL:** <https://community.firebasestudio.dev/t/idx-not-picking-up-versioncode-from-pubspec-yaml-file/2156>\
**Category:** General\
**Created:** [October 2, 2024, 7:57am UTC](https://community.firebasestudio.dev/t/idx-not-picking-up-versioncode-from-pubspec-yaml-file/2156 "2024-10-02T07:57:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abdul\_Shakoor](https://sea2.discourse-cdn.com/flex002/user_avatar/community.firebasestudio.dev/abdul_shakoor/32/1990_2.png) [@Abdul\_Shakoor](https://community.firebasestudio.dev/u/Abdul_Shakoor)\
**Post date:** [October 2, 2024, 7:57am UTC](https://community.firebasestudio.dev/t/idx-not-picking-up-versioncode-from-pubspec-yaml-file/2156/1 "2024-10-02T07:57:38Z")

</div>

The following error occurs and I have to explicitly set versionCode in build.gradle file for it to work. I’ve tried running `flutter pub get` from the terminal but same issue occurs.

2024-10-02T07:29:42Z [android] Starting preview…

2024-10-02T07:29:42Z [android] Flutter daemon started

2024-10-02T07:29:46Z [android] Launching lib/main.dart on Android SDK built for x86 in debug mode…

2024-10-02T07:29:46Z [android] Running Gradle task ‘assembleDebug’…

2024-10-02T07:30:16Z [android] Error:

2024-10-02T07:30:16Z [android]

2024-10-02T07:30:16Z [android] Error: FAILURE: Build failed with an exception.

2024-10-02T07:30:16Z [android]

2024-10-02T07:30:16Z [android] \* Where:

2024-10-02T07:30:16Z [android] Build file ‘/home/user/stride/android/app/build.gradle’ line: 29

2024-10-02T07:30:16Z [android]

2024-10-02T07:30:16Z [android] Error:

2024-10-02T07:30:16Z [android] \* What went wrong:

2024-10-02T07:30:16Z [android] A problem occurred evaluating project ‘:app’.

2024-10-02T07:30:16Z [android] \> Could not get unknown property ‘versionCode’ for extension ‘flutter’ of type FlutterExtension.

---

<div class="post-metadata">

**Author:** ![Srivats\_Venkataraman](https://sea2.discourse-cdn.com/flex002/user_avatar/community.firebasestudio.dev/srivats_venkataraman/32/318_2.png) [@Srivats\_Venkataraman](https://community.firebasestudio.dev/u/Srivats_Venkataraman)\
**Post date:** [October 2, 2024, 3:29pm UTC](https://community.firebasestudio.dev/t/idx-not-picking-up-versioncode-from-pubspec-yaml-file/2156/2 "2024-10-02T15:29:29Z")

</div>

The version code mentioned over here is not related to pubspec.yaml

Go to the bulild.gradle file and see if version is defined
