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 8546549
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T13:03:13+00:00 2026-06-11T13:03:13+00:00

I have an Android project that is targeted to Android 15, but has a

  • 0

I have an Android project that is targeted to Android 15, but has a minimum version of Android 8. This defined in the manifest file:

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

This means I can only use functionality up to Android 8.

When I use methods like the String class’ isEmpty() method (that was added in API 9), IntelliJ and Eclipse both happily compile it, but when I run it on older devices, I get crashes because API 8 does not have isEmpty() implemented.

Does anyone know why neither IDE can catch stuff like this?

My Java compiler is version 1.6.0_33 – would forcing the IDE to use an older version help here?

Thanks! If there is any info I missed, feel free to leave a comment and I’ll dig the info up!

  • 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-11T13:03:14+00:00Added an answer on June 11, 2026 at 1:03 pm

    It is supposed to compile. This allows you to use newer methods in more recent SDKs via wrapper classes. If your target SDK was 8, then the IDE would catch you and complain.

    More info here:

    http://developer.android.com/guide/practices/compatibility.html

    The wrapper class technique is very useful. There is a guide in this blog post about it:

    http://android-developers.blogspot.com/2009/04/backward-compatibility-for-android.html

    Edit:

    It should be noted the latest ADT (r20, perhaps earlier) for Eclipse with Lint in it’s default settings will look for usage of API methods above the minSDK. However it will only check files after they have been modified, or if you run Lint.

    More on Lint: http://tools.android.com/tips/lint

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have come across a strange error. I have an Android project that uses
I have a project that uses two independent Android libraries. Each of them contains
I have an Android project that contains a class that uses JNI to pull
I have an Android project that uses a library project (all of which I
I have an Android library project that has been working for me pretty well,
Eclipse is really bugging me with this. I have an Android project that is
I have an Android project(A) that uses one library module(B) in Intellij IDEA 11.
Background I have an Android project that has a database with two tables: tbl_question
I have a android project that runs fine on the vm, but when I
I have an Android test project that I'd like to link into Hudson, but

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.