How to change Flutter Android minSdkVersion, TargetSdkVersion in Flutter Project

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
foreign okay so I was just working with the project where I'm making use of a library called as flutter in-app webview okay so after installing this Library under dependency section of Pop specification.yaml file I did not got any error but when I made use of this library in my code in that flutter code you can see this here I'm just making use of it to show a web page of my website and here you can see I am getting an error that is uh 16 cannot be smaller than 17 so it is just saying that your SDK version that is minimum SDK version should be 17 or above to make use of this package okay so in this video tutorial let's check out how we can change the minimum SDK version of your flatter project or how you can change the SDK targeted SDK version of your project okay so to change the SDK version just go to android model of your flata project go to app file okay so over here you can see that is a variable by name minimum SDK and this data has been coming from some variable that is been set in flutter dot minimum SDK okay so now suppose if you want to change the minimum SDK project itself then what you can do is you can just change it something like this okay and if you want to change the target SDK version then you can change it from here directly for that will apply only for this project okay so now suppose if you want to make this uh minimum SDK globally so whenever you create a new Full Auto project the minimum SDK will be updated to 17 or above okay so what you can do is you can you just need to go to your flutter SDK where the SDK has been installed so in my case the flutter SDK has been installed in C directory over here so this is the SDK where my flutter has been installed so in your case the SDK has been installed some other place so you just need to figure it out okay so now just go to packages folder and here go to flatter tools and here you may see a file by name griddle so open this one open flutter dot grid any editor okay so I will just open it in Visual Studio okay so now here you can see uh in class flutter extension here you can just change the minimum SDK version so if you need 17 or 18 then you can just directly change it from here so for my project I need 17 I'm just changing it like this you can also change the compilation SDK version so my current text composition version is 33. Target SDK version is 33 you can directly change it from this file okay after doing this just save this file so everything will get changed so now when you run this uh project in your mobile device so the minimum SDK will be taken from your SDK from where you have just changed okay so now if I run this file let's wait okay so you can see uh the application got installed successfully on my physical device so let me show you my screen okay so this is my Android device connected through USB okay so you can see the application has successfully installed on my device without any error okay so that's all for this video tutorial thanks for watching please do subscribe thank you
Info
Channel: Proto Coders Point
Views: 6,403
Rating: undefined out of 5
Keywords: flutter, flutter tutorial, android, android tutorial, flutter minsdkversion, change flutter minsdkversion, flutter change min sdk version, flutter change minsdkversion, flutter android minsdkversion, flutter compilesdkversion, flutter targetsdkversion, flutter versioncode, flutter buildtoolsversion
Id: 6-9Wn4Z9kck
Channel Id: undefined
Length: 4min 0sec (240 seconds)
Published: Fri May 05 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.