我在编译时收到了一个警告,它告诉我:
> 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个警告
我该如何解决这个问题?我正在使用Android Studio。
在我的module:app中。
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
我知道53代表Java 9,所以我尝试将1_9输入代码中,但是却出现了许多错误。
上面!我不知道怎么在Android Studio中纠正这个问题。
buildToolsVersion
的人来说,它是在app
目录下的build.gradle
文件中定义的属性,在顶部非常明显。Android Studio甚至很好地将其突出显示以通知您可以增加该值,并且使用“显示上下文操作”建议将其替换为最新可用版本。 - Dmitrii Semikin