Deprecated API, unchecked/unsafe operation during Android build



I’m getting these messages for awhile now, when building for Android (release/debug):

Running full build
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Project successfully built.
Successfully installed on device with identifier 'emulator-5554'.
Successfully transferred all files.

When I try to build with “-Xlint:deprecation” - as suggested - I’m getting an error that The option 'X' is not supported.

Just wanted make sure that are these messages safe to ignore?



They are indeed safe to ignore, those warnings are emitted when using the tns_core_modules, as their generated Java classes need to be compatible with both pre API 21 and with devices of API 21 and up. The deprecation warnings normally warn that there are APIs whose usage is not recommended on after API 21.

Also, simply running tns run/build android does not allow you to pass any additional or custom options to the gradle build which emits those messages.


Thanks @Pete.K !

(this post has over twenty characters now)