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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T20:10:15+00:00 2026-06-16T20:10:15+00:00

Error: I got and error of Resources$NotFoundException in this line setContentView(R.layout.view_pager_and_titles); I already tested

  • 0

Error:

I got and error of Resources$NotFoundException in this line setContentView(R.layout.view_pager_and_titles); I already tested many others layout, I just got a working sample and tried to change the layout to the working one, but Always got this error, whatever I do.

I am using SlidingMenu, ViewPagerIndicator and SherlockActionBar.

SlidingFragmentActivity:

public class MainActivity extends SlidingFragmentActivity {

    ViewPager mViewPager;
    FragmentPagerAdapter mPagerAdapter;
    protected ListFragment mFrag;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.view_pager_and_titles);

        // set the Behind View
        setBehindContentView(R.layout.menu_frame);
        FragmentTransaction t = this.getSupportFragmentManager()
                .beginTransaction();
        mFrag = new SampleListFragment();
        t.replace(R.id.menu_frame, mFrag);
        t.commit();

        // customize the SlidingMenu
        SlidingMenu sm = getSlidingMenu();
        sm.setShadowWidthRes(R.dimen.shadow_width);
        sm.setShadowDrawable(R.drawable.shadow);
        sm.setBehindOffsetRes(R.dimen.actionbar_home_width);
        setSlidingActionBarEnabled(true);

        mPagerAdapter = new FragmentPagerAdapter(getSupportFragmentManager());
        final ActionBar mActionBar = getSupportActionBar();
        mActionBar.setDisplayHomeAsUpEnabled(true);

        mViewPager = (ViewPager) findViewById(R.id.pager);
        mViewPager.setAdapter(mPagerAdapter);

    }

01-02 13:10:28.224: E/AndroidRuntime(899): FATAL EXCEPTION: main
01-02 13:10:28.224: E/AndroidRuntime(899): java.lang.RuntimeException: Unable to start activity ComponentInfo{br.com.example.nightid.main.BaseSampleActivity}: android.content.res.Resources$NotFoundException: Resource ID #0x7f040060 type #0x12 is not valid
01-02 13:10:28.224: E/AndroidRuntime(899):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
01-02 13:10:28.224: E/AndroidRuntime(899):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
01-02 13:10:28.224: E/AndroidRuntime(899):  at android.app.ActivityThread.access$1500(ActivityThread.java:117)
01-02 13:10:28.224: E/AndroidRuntime(899):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
01-02 13:10:28.224: E/AndroidRuntime(899):  at android.os.Handler.dispatchMessage(Handler.java:99)
01-02 13:10:28.224: E/AndroidRuntime(899):  at android.os.Looper.loop(Looper.java:130)
01-02 13:10:28.224: E/AndroidRuntime(899):  at android.app.ActivityThread.main(ActivityThread.java:3683)
01-02 13:10:28.224: E/AndroidRuntime(899):  at java.lang.reflect.Method.invokeNative(Native Method)
01-02 13:10:28.224: E/AndroidRuntime(899):  at java.lang.reflect.Method.invoke(Method.java:507)
  • 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-16T20:10:16+00:00Added an answer on June 16, 2026 at 8:10 pm

    You can either use the search function in eclipse, search for

    “0x7f040060”


    or go to

    projectfolder/gen/path/R.java that contains your resources.

    You’ll find something like this:

    public static final int Someid=0x7f040060; //These Id is cause error. Also check that under which  class these line contains[Either layout or id or watever].Please check twice that "Someid" is properly mentioned R.layout.Someid or R.id.Someid under proper layout or id.
    

    If it’s under drawable then I’m afraid try to replace that image file

    It’ll take you to your resource in code.

    Hope these might help you 🙂

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

Sidebar

Related Questions

While working on my project, I got this error: The item ... was specified
I got error when I write this code @Html.X().ResourceManager() in view error message :
I get this error Error 1 The item obj\Debug\myproject.Form1.resources was specified more than once
Recently i got this error SecurityError: Error #2148: SWF file file:///C:/Users/SUN/Desktop/TriStateCheckBox2/bin-debug/index.swf cannot access local
I create my own FacebookBundle and I got this error: There is no extension
I got this error in one of my projects seemingly out of no where:
So, I got this error Couldn't find MenuBar with ID=add_page_to_menu But my code for
I updated my JRE to version 7. Then got this error in the eclipse's
I got this error when trying to launch my Qt-application (which was deployed with
I got error Access Violation when the following code is execute : void NoAction()

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.