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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T04:00:28+00:00 2026-06-12T04:00:28+00:00

This is my log cat : It says Fatal Exception : Main and res.resources

  • 0

This is my log cat :

enter image description here

It says Fatal Exception : Main and res.resources not found, and a lot of another errors. Whats going on?

This is my main activity :

public class MainActivity extends Activity {

private final static String highscore = "Your High Score : ";
private ListView listMenu;

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    
    ListMenu listMenuData[] = new ListMenu[]
    {
        new ListMenu(R.drawable.repetition, "Repetition\n" + highscore, 0)
    };
    
    ListMenuAdapter adapter = new ListMenuAdapter(this, R.layout.listmenu_item, listMenuData);
    
    listMenu = (ListView)findViewById(R.id.listMenu);
    
    View header = (View)getLayoutInflater().inflate(R.layout.listmenu_header, null);
    listMenu.addHeaderView(header);
    
    listMenu.setAdapter(adapter);
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    getMenuInflater().inflate(R.menu.activity_main, menu);
    return true;
}

This is the ListMenu, for setter-getter :

public class ListMenu {
public int icon, highscore;
public String title;

public ListMenu(){
    super();
}

public ListMenu(int icon, String title, int highscore){
    super();
    this.icon = icon;
    this.title = title;
    this.highscore = highscore;
}

And this is my ListMenuAdapter class :

public class ListMenuAdapter extends ArrayAdapter<ListMenu> {
Context context;
int layoutResourceId;
ListMenu listmenu[] = null;

static class MenuHolder{
    ImageView imgMenuIcon;
    TextView txtTitle, txtHighScore;
}

public ListMenuAdapter (Context context, int layoutResourceId, ListMenu[] listmenu){
    super(context, layoutResourceId, listmenu);
    this.context = context;
    this.layoutResourceId = layoutResourceId;
    this.listmenu = listmenu;
}

@Override
public View getView(int position, View convertView, ViewGroup parent) {
    // TODO Auto-generated method stub
    View row = convertView;
    MenuHolder holder = null;
    
    if(row == null)
    {
        LayoutInflater inflater = ((Activity)context).getLayoutInflater();
        row = inflater.inflate(layoutResourceId, parent, false);
        
        holder = new MenuHolder();
        holder.imgMenuIcon = (ImageView)row.findViewById(R.id.imgMenuIcon);
        holder.txtTitle = (TextView)row.findViewById(R.id.txtTitle);
        holder.txtHighScore = (TextView)row.findViewById(R.id.txtHighScore);
        
        row.setTag(holder);
    }
    else holder = (MenuHolder)row.getTag();
    
    ListMenu menu = listmenu[position];
    holder.imgMenuIcon.setImageResource(menu.icon);
    holder.txtTitle.setText(menu.title);
    holder.txtHighScore.setText(menu.highscore);
    
    return row;
}

I followed and modified my codes from this tutorial : click here

Some people said that android.content.res.resources$NotFoundException error can be fixed by cleaning the project/restart the Eclipse, but its NOT working for me

Sorry for the long post, i really dont know what to do now
Thanks 😀

  • 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-12T04:00:29+00:00Added an answer on June 12, 2026 at 4:00 am

    If so, then this is the problem. You should do :

    holder.txtHighScore.setText(""+menu.highscore);
    

    Since menu.highscore is int, it will invoke method setText(int resId) which loads the assossiated resource id that you defined on your strings.xml.

    If you put ""+menu.highscore, it will invoke setText(CharSequence text) which is what you want.

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

Sidebar

Related Questions

I am working on an android game https://code.google.com/p/something-soft/ and I my log cat says
I have a problem with a class, log cat return this error when a
I'm getting an error in my Android app that says source not found and
I am getting this exception in the LogCat: Unable to start service Intent {
I have this code: function Keyboard() { this.log = $('#log')[0]; this.pressedKeys = []; this.bindUpKeys
I have set up a screen rc file like this: log on shelltitle apt
I have a table on my database called 'Log'. This Log table contains ID,
I'm analyzing an iOS 4 application for iPhone and I get this log: Leaked
Why is this: console.log(1100 ^ 0001) => 1101 // as expected console.log(1100 ^ 1001)
I sometimes get a null pointer exception with my code. Oddly enough, this does

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.