Use Xlint:deprecation with android

后端 未结 5 2334
猫巷女王i
猫巷女王i 2021-02-19 10:57

So I almost always get some message like this when I\'m compiling my android app:

[javac] Note: /home/kurtis/sandbox/udj/androidApp/src/org/klnusbaum/udj/Playlis         


        
5条回答
  •  日久生厌
    2021-02-19 12:02

    Even simpler and without the need to copy a complete javac target: put the following line in ant.properties file :

    java.compilerargs=-Xlint:unchecked
    

    This way, it just overrides java.compilerargs from Android SDK default build configuration. (You can check for yourself that it is empty by default, btw). No mess with SDK update that could change the default javac target without your project being notified.

    Just a more granular way to do! :)

提交回复
热议问题