I tried to add to AndroidManifest.xml But the package is throwing multiple errors
e.g.
error: cannot find symbol
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S) {
symbol: variable S
location: class VERSION_CODES
error: cannot find symbol case Manifest.permission.BLUETOOTH_SCAN: symbol: variable BLUETOOTH_SCAN location: class permission
the above error message repeats itself for BLUETOOTH_ADVERTISE, BLUETOOTH_CONNECT
I don't know what to do, any help would be appreciated.
CodePudding user response:
make sure you set compileSdkVersion in your android/app/build.gradle file to 31
Reference : Flutter Github Issue Link
CodePudding user response:
Build.VERSION_CODES.S is the last update of android sdk, please check if exist update
CodePudding user response:
go to android/app/build.gradle
change compileSdkVersion
to 31 then do a flutter clean
CodePudding user response:
changing the compileSdkVersion to 31 in your android\app\build.gradle can fix this issue