源值为1.5已过时,会在将来的版本中删除会在、值为、将来、版本

2023-09-07 14:08:26 作者:盯着贞子唱咆哮

我如何prevent从产生的停止生成过程中的错误有以下两个警告?

  -compile:    [javac的] 77编译源文件/Users/andev/Workspace/android/products/myproject/1.0/Facebook/bin/classes    [javac的]警告:[选项]源值为1.5已过时,会在将来的版本中删除    [javac的]警告:[选项]目标值1.5已过时,会在将来的版本中删除    [javac的]警告:[options]为坐席约过时的选项preSS警告,使用-Xlint:-options。    [javac的]错误:找到警告和-Werror规定    [javac的] 1个错误    [javac的] 3警告 

解决方案

要能够建立,我创建Facebook的项目中的文件 ant.properties (第一个项目被编译)与内容物:

  java.compilerargs = -Xlint:-options 
IDEA中提示 Warning java 源值1.5已过时, 将在未来所有发行版中删除

How do I prevent the two warnings below from generating an error that stops the build process ?

-compile:
    [javac] Compiling 77 source files to /Users/andev/Workspace/android/products/myproject/1.0/Facebook/bin/classes
    [javac] warning: [options] source value 1.5 is obsolete and will be removed in a future release
    [javac] warning: [options] target value 1.5 is obsolete and will be removed in a future release
    [javac] warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
    [javac] error: warnings found and -Werror specified
    [javac] 1 error
    [javac] 3 warnings

解决方案

To be able to build, I created a file ant.properties in the facebook project (first project that is compiled) with the contents :

java.compilerargs=-Xlint:-options