warning: [options] source value 7 is obsolete and will be removed in a future release
warning: [options] target value 7 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
error: warnings found and -Werror specified
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':connectivity:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
2条答案
按热度按时间3ks5zfa01#
将其添加到app/build.gradle文件中的
android {
节下此代码将为您停止问题,并将停止获得这些警告,如错误消息。
kb5ga3dv2#
该错误消息意味着,您的Java代码有警告。由于
-Werror
标志,它成为一个错误。警告说,您的Java目标版本太旧。
因此,您可以升级该版本。或者删除
-Werror
。