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

  • Home
  • SEARCH
  • 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 8973715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:30:43+00:00 2026-06-15T18:30:43+00:00

I was following the basic tutorials on developers.android.com and came by creating the activity

  • 0

I was following the basic tutorials on developers.android.com and came by creating the activity named DisplayMessageActivity. It is a blank activity with all the specifications given as shown in the tutorial. FYI, I am using Min SDK = API 8, Target SDK = API 16, Compile with = API 10

The next thing is that there are two errors:

  1. “The method getActionBar() is undefined for the type DisplayMessageActivity
  2. “home cannot be resolved or is not a field”

I tried changing the API to 14 which called for another problem, it wants the minimum API to be 11.

That solves these problems, but the main problem is so many devices still use Gingerbread or maybe FroYo. Can’t I write for them? Do I have to go higher? How to write for them?

  • 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-15T18:30:45+00:00Added an answer on June 15, 2026 at 6:30 pm

    First, you’re going to want to make sure that you are compiling against the latest version of Android. You should update your sdk version because you’re compiling for API 10 but targeting 16. Stuff may break if you do that, so it’s best to stay updated to be safe.
    This means right clicking on your project in Eclipse, clicking on Properties then clicking on Android. Check off the highest version API that is there. If you have the latest version, it is Android 4.2. Then in your AndroidManifest.xml, set the android:targetSdkVersion to what you chose (my case api 17).

    enter image description here

    This should ensure that your app can run on basically HoneyComb to JellyBean. However, this app wants to run on at least froyo. This next part will allow your app to run on all devices.

    Make a method like this:

    @TargetApi(Build.VERSION_CODES.HONEYCOMB)
        private void setupActionBar() {
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
                // Show the Up button in the action bar.
                getActionBar().setDisplayHomeAsUpEnabled(true);
            }
        }
    

    It checks to see which API it is running on and only if it is honeycomb and above, enables the action bar.
    Call it from onCreate() You will need to take out the getActionBarCall that is in onCreate() as it is not needed anymore there.

    As for home not being enabled, it might have just been a wrong project target or you forgot to write android.R.id.home and instead wrote R.id.home.

    Lastly with all these changes you should clean your project (Project -> Clean).

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

Sidebar

Related Questions

I'm following a basic tutorial for the android jni development at http://permadi.com/blog/2011/12/running-android-ndk-examples-using-eclipse-and-sequoyah/ . Before
I've been following a tutorial on http://michaelellerbeck.com/2009/01/12/creating-a-service-for-visual-basic-2008-express/ for creating a service using VB Express
Following the Android SDK tutorials I have implemented my first basic date picker dialog.
I'm using Eclipse with ADT and I'm following this tutorial: http://developer.android.com/training/basics/firstapp/starting-activity.html to make an
I'm following this tutorial: http://developer.android.com/training/basics/firstapp/running-app.html#Emulator In it there is a simple code for a
I´m totally new to programming in java, and following some basic tutorials for my
I am learning ASP.NET MVC. I am following one of the basic tutorials on
I'm following the Android developers tutorial to build the first application. I did precisely
I'm pretty new to Android Development, i'm following some Youtube tutorials currently. I'd like
http://developer.android.com/training/basics/firstapp/building-ui.html I have been following this tutorial, but I have two errors, both R

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.