Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

warning: [options] source value 8 is obsolete and will be removed in a future release

i am getting this error when i run my flutter app.

3 warnings warning: [options] source value 8 is obsolete and will be removed in a future release warning: [options] target value 8 is obsolete and will be removed in a future release warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.

I am using gradle 8.1 version. after configuring my project with firebase, i am getting this error. Is the problem causes for gradle version 8.1? on the other hand, i can't use gradle version 7.5 because of my jdk version.

like image 416
Shafi Munshi Avatar asked Nov 23 '25 09:11

Shafi Munshi


1 Answers

edit your build.gradle.kts & replace :

compileOptions { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 }

with :

compileOptions { sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 }

or go to File-Project Structure- Modules- Properties & choose your version of Source Compatibility & Target compatibility (mine is 17)

like image 90
Allin Marck Avatar answered Nov 25 '25 23:11

Allin Marck



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!