2

I am currently using Flutter V2.5.0. I updated to targetSdkVersion 33, however, I can't open it and am stuck in the APK file installation process.

How can I update to targetSDK 33 and keep Flutter version 2.5.0?

Suraj Rao
  • 29,388
  • 11
  • 94
  • 103

2 Answers2

3

open android folder > app folder > build.gradle

Before upgrade---

targetSdkVersion flutter.targetSdkVersion

enter image description here

After upgrade---

targetSdkVersion 33

enter image description here

Mike Irving
  • 1,480
  • 1
  • 12
  • 20
Md Nezam Uddin
  • 262
  • 1
  • 5
1

open build.gradle file

replace compileSdkVersion flutter.compileSdkVersion with Math.max(flutter.compileSdkVersion, 33)

replace targetSdkVersion flutter.targetSdkVersion with targetSdkVersion Math.max(flutter.targetSdkVersion, 33)

and

replace minSdkVersion flutter.minSdkVersion with minSdkVersion Math.max(flutter.minSdkVersion, 23) if required.

Rahul
  • 3,529
  • 1
  • 5
  • 19