How to start cordova with -Xlint: deprecation

when creating my plugin using

cordova build 

Cordoba reports that my plugin uses the deprecation API and for more information I should

 Recompile with -Xlint:deprecation for details. 

But how can I pass -Xlint: deprecation as a parameter to build cordova?

+5
source share
1 answer

I think this is an Android installation issue, you can try disabling the Xlint: deprecation flag, as said in this post.

  • Go to the $ ANDROID_SDK_ROOT / tools / ant / main_rules.xml file and copy the compilation target.
  • Paste it into the build.xml file before the task.
  • Then add the following element to the task: <compilerarg value="-Xlint:deprecation"/>
  • Similarly, you can add other compiler options, for example, for unverified operations: <compilerarg value="-Xlint:unchecked"/>
+1
source

Source: https://habr.com/ru/post/1234180/


All Articles