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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:02:07+00:00 2026-06-14T14:02:07+00:00

I am teaching myself how to write an android application in eclipse. I have

  • 0

I am teaching myself how to write an android application in eclipse. I have the following content in R.Java

 public static final class menu {
    public static final int activity_marblez_main=0x7f060000;
}

However, in my main java file, I can’t seem to “see” my objects in R.java.

package com.example.marblez;

import android.R;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;

public class MarblezMain extends Activity {

//Custom View for Marble View
private MarblezView mView;

//ID for the menu exit option 
private final int ID_MENU_EXIT = 1; 

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    mView = new MarblezView(getApplicationContext(), this);
    mView.setFocusable(true);

    setContentView(R.layout.activity_marblez_main);
}

My problem is that when I write the line:

 setContentView(R.layout.activity_marblez_main);

It still can’t see activity_marblez_main. I have imported the R.Java file. I have deleted it and regenerated it, but it can’t fine “activity_marblez_main”. Why? The specific error is:

"activity_marble_main cannot be resolved or is not a field" 

I also cannot, for that matter, read anything else from the R.java file such as strings or anything. Does anyone know what could be causing this error. I am tearing my hair out. I know computers don’t lie, but I am seeing everything where it should be and it is just like the program just won’t read it?

  • 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-14T14:02:08+00:00Added an answer on June 14, 2026 at 2:02 pm

    Remove this line

    import android.R;
    

    as you are importing platform’s R file, not yours, which should be:

     import com.example.marblez.R;
    

    (but you also can have none, which is OK). You can re-generate imports in Eclipse by pressing CTRL–SHIFT–O (letter “o”). Just ensure you got no platform R imported.

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

Sidebar

Related Questions

I am teaching myself Java and I have a simple package with three classes
I've been teaching myself to write exploits and shellcode recently and many of the
I'm teaching myself programming and today's challenge is to write a program that can
Im teaching myself java and the book i'm looking at just got around to
I have recently started teaching myself C# and Asp.net. I am trying to build
I am teaching myself to use JavaCC in a hobby project, and have a
I am teaching myself to write classes in C++ but can't seem to get
Im still teaching myself Java so I wanted to try to read a text
I'm pretty good at Haskell and have been teaching myself J . I've read
I'm teaching myself CIL and have been doing ok so far (just really started

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.