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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T12:22:21+00:00 2026-06-10T12:22:21+00:00

My app crashed when I set my android:targetSdkVersion=8 but when I set it to

  • 0

My app crashed when I set my android:targetSdkVersion="8" but when I set it to android:targetSdkVersion="11" everything goes fine. Please look at logcat, I really dont know whats wrong with my codes. It looks like any device using SDK below 11 will get this problem. My min sdk is 7. I might bump into alot trouble if I continue to deliver my app.

public class SingleMenuItemActivity  extends Activity {

    // XML node keys
static final String KEY_TITLE = "title";
static final String KEY_ARTIST = "artist";  
static final String KEY_THUMB_URL = "thumb_url";
private ProgressDialog pDialog;
String title;
String artist;
String image_url;
ImageView view;
Intent intent;
Context context;
ShareActionProvider mShareActionProvider;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.single_list_item);
        new loadSingleView().execute(); 




        view = (ImageView) findViewById(R.id.single_image);

    }

public class loadSingleView extends AsyncTask<String, String, String> {

        @Override
        protected void onPreExecute() {
            super.onPreExecute();
            pDialog = new ProgressDialog(
                    SingleMenuItemActivity.this);
            pDialog.setMessage("Connecting to Server ...");
            pDialog.setIndeterminate(false);
            pDialog.setCancelable(false);
            pDialog.show();
        }
        @Override
        protected String doInBackground(String... args) {
            // updating UI from Background Thread


            Intent in = getIntent();

            image_url = in.getStringExtra(KEY_THUMB_URL);
                        title = in.getStringExtra(KEY_TITLE);
            artist = in.getStringExtra(KEY_ARTIST);

            return null;

                    }
        @Override       
        protected void onPostExecute(String args) {
            // dismiss the dialog after getting all products

            ImageLoader imgLoader = new ImageLoader(getApplicationContext());

            imgLoader.DisplayImage(image_url, view);

            TextView lblName = (TextView) findViewById(R.id.name_title);
            TextView lblCost = (TextView) findViewById(R.id.name_artist);



            lblName.setText(title);
            lblCost.setText(artist);

            ActionBar ab = getActionBar();
            ab.setTitle(title);

            pDialog.dismiss();

        }


}   

Logcat:

08-19 02:19:03.351: E/AndroidRuntime(22761): FATAL EXCEPTION: main
08-19 02:19:03.351: E/AndroidRuntime(22761): java.lang.NullPointerException
08-19 02:19:03.351: E/AndroidRuntime(22761):    at com.example.androidhive.SingleMenuItemActivity$loadSingleView.onPostExecute(SingleMenuItemActivity.java:88)
08-19 02:19:03.351: E/AndroidRuntime(22761):    at com.example.androidhive.SingleMenuItemActivity$loadSingleView.onPostExecute(SingleMenuItemActivity.java:1)
08-19 02:19:03.351: E/AndroidRuntime(22761):    at android.os.AsyncTask.finish(AsyncTask.java:602)
08-19 02:19:03.351: E/AndroidRuntime(22761):    at android.os.AsyncTask.access$600(AsyncTask.java:156)
08-19 02:19:03.351: E/AndroidRuntime(22761):    at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:615)
08-19 02:19:03.351: E/AndroidRuntime(22761):    at android.os.Handler.dispatchMessage(Handler.java:99)
08-19 02:19:03.351: E/AndroidRuntime(22761):    at android.os.Looper.loop(Looper.java:137)
08-19 02:19:03.351: E/AndroidRuntime(22761):    at android.app.ActivityThread.main(ActivityThread.java:4512)
08-19 02:19:03.351: E/AndroidRuntime(22761):    at java.lang.reflect.Method.invokeNative(Native Method)
08-19 02:19:03.351: E/AndroidRuntime(22761):    at java.lang.reflect.Method.invoke(Method.java:511)
08-19 02:19:03.351: E/AndroidRuntime(22761):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:982)
08-19 02:19:03.351: E/AndroidRuntime(22761):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:749)
08-19 02:19:03.351: E/AndroidRuntime(22761):    at dalvik.system.NativeStart.main(Native Method)
  • 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-10T12:22:23+00:00Added an answer on June 10, 2026 at 12:22 pm

    SDK 8 does not have ActionBar. You will have to use something like the ActionBarSherlock library to have ActionBar support for SDK < Honeycomb.

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

Sidebar

Related Questions

I had my camera set to this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); and it works fine but if I
Hi there my app crashed only on iPad simulator 4.3. The app run fine
I am trying to set shared_prefs from an xml file but, when simulating, app
I want to change the look of my Android app's preference screen to white
I have built an android app, but it does not seem stable. It is
My app crashed when i trying to change UITextView text. Here is the code:
I spent a lot of time to find out why my app crashed. My
That's what Apple said - the app got crashed for them against iPad 3,
When I am trying to release the object of UIPopoverController ,app gets crashed with
I would like for my app to reset to standard settings if it crashed

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.