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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T14:03:58+00:00 2026-06-15T14:03:58+00:00

Well, after many other issues I have finally weeded it down to this one

  • 0

Well, after many other issues I have finally weeded it down to this one error that keeps happening when I try and open the application. I have tried other solutions for NullPointerExceptions but they do not seem to work.

Here is a LogCat:

 12-08 03:03:40.222: E/AndroidRuntime(1974): FATAL EXCEPTION: main
12-08 03:03:40.222: E/AndroidRuntime(1974): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.zekfed.minecraft.pro/com.zekfed.minecraft.pro.Main}: java.lang.NullPointerException
12-08 03:03:40.222: E/AndroidRuntime(1974):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2106)
12-08 03:03:40.222: E/AndroidRuntime(1974):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
12-08 03:03:40.222: E/AndroidRuntime(1974):     at android.app.ActivityThread.access$600(ActivityThread.java:141)
12-08 03:03:40.222: E/AndroidRuntime(1974):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
12-08 03:03:40.222: E/AndroidRuntime(1974):     at android.os.Handler.dispatchMessage(Handler.java:99)
12-08 03:03:40.222: E/AndroidRuntime(1974):     at android.os.Looper.loop(Looper.java:137)
12-08 03:03:40.222: E/AndroidRuntime(1974):     at android.app.ActivityThread.main(ActivityThread.java:5039)
12-08 03:03:40.222: E/AndroidRuntime(1974):     at java.lang.reflect.Method.invokeNative(Native Method)
12-08 03:03:40.222: E/AndroidRuntime(1974):     at java.lang.reflect.Method.invoke(Method.java:511)
12-08 03:03:40.222: E/AndroidRuntime(1974):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
12-08 03:03:40.222: E/AndroidRuntime(1974):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
12-08 03:03:40.222: E/AndroidRuntime(1974):     at dalvik.system.NativeStart.main(Native Method)
12-08 03:03:40.222: E/AndroidRuntime(1974): Caused by: java.lang.NullPointerException
12-08 03:03:40.222: E/AndroidRuntime(1974):     at android.app.Activity.initActionBar(Activity.java:1861)
12-08 03:03:40.222: E/AndroidRuntime(1974):     at android.app.Activity.getActionBar(Activity.java:1848)
12-08 03:03:40.222: E/AndroidRuntime(1974):     at com.zekfed.minecraft.pro.Main.<init>(Main.java:48)
12-08 03:03:40.222: E/AndroidRuntime(1974):     at java.lang.Class.newInstanceImpl(Native Method)
12-08 03:03:40.222: E/AndroidRuntime(1974):     at java.lang.Class.newInstance(Class.java:1319)
12-08 03:03:40.222: E/AndroidRuntime(1974):     at android.app.Instrumentation.newActivity(Instrumentation.java:1054)
12-08 03:03:40.222: E/AndroidRuntime(1974):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2097)
12-08 03:03:40.222: E/AndroidRuntime(1974):     ... 11 more
12-08 03:04:37.692: W/Trace(2024): Unexpected value from nativeGetEnabledTags: 0
12-08 03:04:37.692: W/Trace(2024): Unexpected value from nativeGetEnabledTags: 0
12-08 03:04:37.692: W/Trace(2024): Unexpected value from nativeGetEnabledTags: 0
12-08 03:04:37.742: W/Trace(2024): Unexpected value from nativeGetEnabledTags: 0
12-08 03:04:37.742: W/Trace(2024): Unexpected value from nativeGetEnabledTags: 0
12-08 03:04:37.762: D/AndroidRuntime(2024): Shutting down VM
12-08 03:04:37.762: W/dalvikvm(2024): threadid=1: thread exiting with uncaught exception (group=0x40a70930)
12-08 03:04:37.772: E/AndroidRuntime(2024): FATAL EXCEPTION: main
12-08 03:04:37.772: E/AndroidRuntime(2024): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.zekfed.minecraft.pro/com.zekfed.minecraft.pro.Main}: java.lang.NullPointerException
12-08 03:04:37.772: E/AndroidRuntime(2024):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2106)
12-08 03:04:37.772: E/AndroidRuntime(2024):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
12-08 03:04:37.772: E/AndroidRuntime(2024):     at android.app.ActivityThread.access$600(ActivityThread.java:141)
12-08 03:04:37.772: E/AndroidRuntime(2024):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
12-08 03:04:37.772: E/AndroidRuntime(2024):     at android.os.Handler.dispatchMessage(Handler.java:99)
12-08 03:04:37.772: E/AndroidRuntime(2024):     at android.os.Looper.loop(Looper.java:137)
12-08 03:04:37.772: E/AndroidRuntime(2024):     at android.app.ActivityThread.main(ActivityThread.java:5039)
12-08 03:04:37.772: E/AndroidRuntime(2024):     at java.lang.reflect.Method.invokeNative(Native Method)
12-08 03:04:37.772: E/AndroidRuntime(2024):     at java.lang.reflect.Method.invoke(Method.java:511)
12-08 03:04:37.772: E/AndroidRuntime(2024):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
12-08 03:04:37.772: E/AndroidRuntime(2024):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
12-08 03:04:37.772: E/AndroidRuntime(2024):     at dalvik.system.NativeStart.main(Native Method)
12-08 03:04:37.772: E/AndroidRuntime(2024): Caused by: java.lang.NullPointerException
12-08 03:04:37.772: E/AndroidRuntime(2024):     at android.app.Activity.initActionBar(Activity.java:1861)
12-08 03:04:37.772: E/AndroidRuntime(2024):     at android.app.Activity.getActionBar(Activity.java:1848)
12-08 03:04:37.772: E/AndroidRuntime(2024):     at com.zekfed.minecraft.pro.Main.<init>(Main.java:48)
12-08 03:04:37.772: E/AndroidRuntime(2024):     at java.lang.Class.newInstanceImpl(Native Method)
12-08 03:04:37.772: E/AndroidRuntime(2024):     at java.lang.Class.newInstance(Class.java:1319)
12-08 03:04:37.772: E/AndroidRuntime(2024):     at android.app.Instrumentation.newActivity(Instrumentation.java:1054)
12-08 03:04:37.772: E/AndroidRuntime(2024):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2097)
12-08 03:04:37.772: E/AndroidRuntime(2024):     ... 11 more

Here is my Main.class:

///////////////////////////////////////////////////////////////////////////////////////////////////
//                                                                                               //
//                Zeklandian Minecraft Guide : Pro Version                                       //
//                                                                                               //
//                             Created by Asher Wood                                             //
//                             and Khuram Shazad                                                 //
//                                                                                               //
//                             ??2012 Asher Wood and Khuram Shazad                                //
//                                                                                               //
//                             Layout Handler / Main Class                                       //
//                                                                                               //
///////////////////////////////////////////////////////////////////////////////////////////////////

package com.zekfed.minecraft.pro;

import android.app.ActionBar;
import android.content.Context;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.View;
import android.view.ViewGroup;

public class Main extends FragmentActivity {

    // Create ViewPager, Make sliding screens
        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.main);
            mSectionsPagerAdapter = new SectionsPagerAdapter(
                    getSupportFragmentManager());
            mViewPager = (ViewPager) findViewById(R.id.pager);
            mViewPager.setAdapter(mSectionsPagerAdapter);
        }

    private static final String ARG_SECTION_NUMBER = null;
    SectionsPagerAdapter mSectionsPagerAdapter;
    static ViewPager mViewPager;

    // ActionBar: Make ActionBar and Buttons
    ActionBar actionbar = getActionBar();

    // Make Menu
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        MenuInflater inflater = getMenuInflater();
        inflater.inflate(R.menu.main, menu);
        return true;
    }



    // Create Fragments

    public class SectionsPagerAdapter extends FragmentPagerAdapter {

        public SectionsPagerAdapter(FragmentManager fm) {
            super(fm);
        }

        @Override
        public Fragment getItem(int i) {
            Fragment fragment = new SectionFragment();
            Bundle args = new Bundle();
            args.putInt(SectionFragment.ARG_SECTION_NUMBER, i);
            fragment.setArguments(args);
            return fragment;
        }

        @Override
        public int getCount() {
            return 5;
        }

        // Create titles

        @Override
        public CharSequence getPageTitle(int position) {
            switch (position) {
            case 0:
                return getString("Blocks").toUpperCase();
            case 1:
                return getString("Items").toUpperCase();
            case 2:
                return getString("Tools & Armour").toUpperCase();
            case 3:
                return getString("Mobs").toUpperCase();
            case 4:
                return getString("Structures").toUpperCase();

            }
            return null;
        }

        private String getString(String string) {
            // TODO Auto-generated method stub
            return null;
        }

    }

    // Create pages

    public static class SectionFragment extends Fragment {
        public SectionFragment() {
        }

        public static final String ARG_SECTION_NUMBER = null;

        @Override
        public View onCreateView(LayoutInflater inflater, ViewGroup container,
                Bundle savedInstanceState) {
            LayoutInflater inflater1 = (LayoutInflater) mViewPager.getContext()
                    .getSystemService(Context.LAYOUT_INFLATER_SERVICE);

            Bundle args = new Bundle();
            int resId = (Integer) getArguments().get(ARG_SECTION_NUMBER);
            switch (resId) {

            case 0:
                resId = R.layout.blocks;
                break;
            case 1:
                resId = R.layout.toolsarmour;
                break;
            case 2:
                resId = R.layout.items;
                break;
            case 3:
                resId = R.layout.mobs;
                break;
            case 4:
                resId = R.layout.structures;
                break;

            }

            View view = inflater1.inflate(resId, null);

            return view;
        }

    }

    private Bundle getArguments() {
        return null;
    }
}
  • 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-15T14:03:59+00:00Added an answer on June 15, 2026 at 2:03 pm

    Are you sure that line 48 is the appropriated place for this code?

    ActionBar actionbar = getActionBar();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

ok I am well aware there are many other questions about this, but I
In my project I have a class that is inherited by many other classes.
After much searching and googling I am coming back to the well. I have
I've got an after insert trigger that works well. However, I want it to
Tomcat has got that well-known memory leak problem that causes PermGen space errors after
here's a Fusion Tables map that's broken after a search. It does everything well
update: After not getting anywhere with this, I noticed that when I pulled the
After this comment to one of my questions, I'm thinking if it is better
I have asked this question so many times and have tried so many different
I have been fighting a memory leak, well a little more then one it

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.