Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run cordova build with -Xlint:deprecation

when building my plugin with

cordova build

Cordova reports that my plugin is using deprecation API and for more info I should

Recompile with -Xlint:deprecation for details.

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

like image 382
mauron85 Avatar asked Oct 21 '15 08:10

mauron85


1 Answers

I think this is an Android build related problem, you could try to disable Xlint:deprecation flag, as is said in this post

  1. Go to the $ANDROID_SDK_ROOT/tools/ant/main_rules.xml file and copy the "compile" target.
  2. Paste it into your build.xml file before the task.
  3. Then add the following element to the task: <compilerarg value="-Xlint:deprecation"/>
  4. Likewise, you can add other compiler options, such as for unchecked operations: <compilerarg value="-Xlint:unchecked"/>
like image 91
dloeda Avatar answered Sep 28 '22 07:09

dloeda