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

前端 未结 3 693
南方客
南方客 2021-02-12 11:39

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/W         


        
3条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-12 12:09

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

    At the section, you can either set the compiler flags:

    
    

    or, alternatively, change the source and target parameters:

    
    
    

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

提交回复
热议问题