Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

source value 1.5 is obsolete and will be removed in a future release

Tags:

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 
like image 617
Someone Somewhere Avatar asked Jun 20 '14 16:06

Someone Somewhere


1 Answers

Another possibility (which will fix it for all Android builds made with Ant), is to tweak the default parameters for the -compile task in <android-sdk>\tools\ant\build.xml.

At the <!-- compilation options --> section, you can either set the compiler flags:

<property name="java.compilerargs" value="-Xlint:-options" /> 

or, alternatively, change the source and target parameters:

<property name="java.target" value="1.6" /> <property name="java.source" value="1.6" /> 

As of now, 1.6 is enough to avoid the warning.

like image 191
matiash Avatar answered Sep 18 '22 18:09

matiash