I have an Android library project with
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
It uses a lot of lambdas, try with resources and etc.
How could I downgrade sourceCompatibility & targetCompatibility to Java 1.6 instead?
Is there such functionality built in Android Studio IDE?
You can replace the lambda by placing the cursor inside the ->
and pressing Alt + Enter then select "Replace lambda with..."
You can do it on an entire file by expanding the menu and selecting "Fix all..."
You can do it on the whole project by following the above steps, but instead click "Run inspection on..."
Select "Whole project"
Once the inspection finishes, right click on the "Lambda can be replaced..." section and select "Replace lambda with..."
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With