, android lint ( @CommonsWare ):
$ which lint
/android-sdk-macosx/tools/lint
$ lint myProjectDir --check NewApi
Scanning .: .....
No issues found.
, ant lint SDK Tools Revision 21.
Lint , ! Jenkins --xml ..
, ant.properties - , - lint- , javac:
java.compilerargs=-Xlint:all
, javac , lint --check NewApi, [deprecation] . ( javac, .)
lint NewApi checker:
$ lint --show NewApi
NewApi
------
Summary: Finds API accesses to APIs that are not supported in all targeted API
versions
Priority: 6 / 10
Severity: Error
Category: Correctness
This check scans through all the Android API calls in the application and
warns about any calls that are not available on all versions targeted by this
application (according to its minimum SDK attribute in the manifest).
If you really want to use this API and don't need to support older devices
just set the minSdkVersion in your AndroidManifest.xml file.
If your code is deliberately accessing newer APIs, and you have ensured (e.g.
with conditional execution) that this code will only ever be called on a
supported platform, then you can annotate your class or method with the
@TargetApi annotation specifying the local minimum SDK to apply, such as
@TargetApi(11), such that this check considers 11 rather than your manifest
file minimum SDK as the required API level.
lint: