Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

major version 53 is newer than 52, the highest major version supported by this compiler. Android studio

Tags:

java

android

I got a warning while I compile it tells me :

> Task :app:compileDebugJavaWithJavac
warning: C:\Users\bleuc\AppData\Local\Android\Sdk\build-tools\30.0.1\core-lambda- 
stubs.jar(java/lang/invoke/LambdaMetafactory.class): major version 53 is newer than 52, the highest 
major version supported by this compiler.
It is recommended that the compiler be upgraded.
C:\Users\bleuc\AppData\Local\Android\Sdk\build-tools\30.0.1\core-lambda- 
stubs.jar(java/lang/invoke/LambdaMetafactory.class): major version 53 is newer than 52, the highest 
major version supported by this compiler.

1 warning

How can I resolve this? I'm using android studio.

In my module:app

compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}

I know 53 is java 9 so I tried to pout 1_9 but it shows me so much errors.

Up! I don't know how to correct this on Android studio

like image 449
Loic Jackotin Avatar asked Dec 23 '22 16:12

Loic Jackotin


1 Answers

Well, i updated my buildToolsVersion in build.gradle (app level, e.g. Module: YourApp.app) "30.0.2" and the warning disapeard.

apply plugin: 'com.android.application'

android {
    compileSdkVersion 30
    buildToolsVersion "30.0.2"

    defaultConfig {
        applicationId "com.app"
        minSdkVersion 20
        targetSdkVersion 30
        versionCode 1
        versionName "0.0.1"
    }

    ...
}
like image 94
Loic Jackotin Avatar answered May 17 '23 21:05

Loic Jackotin