Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9290581
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T20:27:13+00:00 2026-06-18T20:27:13+00:00

I’m working on an android app, and worried that we have introduced code that

  • 0

I’m working on an android app, and worried that we have introduced code that uses functionality from API levels later than its minSdkVersion.

I’d like to know if there’s any way to detect some of these violations automatically.

In this app’s AndroidManifest.xml file, it specifies:

<uses-sdk android:minSdkVersion="8"
          android:targetSdkVersion="17" />

ndk-build is seems to be giving me a warning about this (or is this warning for another reason?):

Android NDK: Found stable platform levels: 14 3 4 5 8 9
Android NDK: Found max platform level: 14
Android NDK: Parsing ./jni/Application.mk
Android NDK:   Found APP_PLATFORM=android-17 in ./project.properties
Android NDK:   Adjusting APP_PLATFORM android-17 to android-14 and enabling -fPIE
/android-ndk/build/core/add-application.mk:128: Android NDK: WARNING: APP_PLATFORM android-14 is larger than android:minSdkVersion 8 in ./AndroidManifest.xml    

While I realize any tool cannot be 100% accurate due to runtime dispatch, other than:

  • a full audit of the source code, or
  • a complete testing of all code paths on a device running minSdkVersion (in this case android-8 = 2.2 = Froyo)

…is there a lint-like tool, a build setting change, or anything else I can use to identify at least the most obvious/blatant violations?

If no such thing exists, is there a comprehensive API list or something that will make an audit easier?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T20:27:14+00:00Added an answer on June 18, 2026 at 8:27 pm

    It looks like the android lint tool does some of these checks (thanks @CommonsWare in the comments above):

    $ which lint
    /android-sdk-macosx/tools/lint
    
    $ lint myProjectDir --check NewApi
    
    Scanning .: .....
    
    No issues found.
    

    It appears you can also run this as ant lint as of SDK Tools Revision 21.

    Lint has various nice output formats, it seems! Integration with Jenkins via --xml, etc…


    In addition, in ant.properties, you can set something like this to have some lint-like checks performed by javac:

    java.compilerargs=-Xlint:all
    

    It’s unclear whether javac reports incidents like lint –check NewApi does, but it does report [deprecation] entries at least. (If you find a reference for what javac reports, please post a comment.)


    For posterity, here’s the description of lint’s 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's minimum SDK as the required API level.
    

    And here are some helpful links regarding lint:

    • http://developer.android.com/tools/help/lint.html
    • http://developer.android.com/tools/debugging/improving-w-lint.html
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a small JavaScript validation script that validates inputs based on Regex. I
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have a text area in my form which accepts all possible characters from
I have a view passing on information from a database: def serve_article(request, id): served_article
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I have a bunch of posts stored in text files formatted in yaml/textile (from
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.