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

  • Home
  • SEARCH
  • 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 7835717
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T13:46:02+00:00 2026-06-02T13:46:02+00:00

Hi In my eclipse android project, whenever i try to add a xml file

  • 0

Hi In my eclipse android project, whenever i try to add a xml file named options.xml the R disappears.
This is what i did,
under res folder i created a menu folder through eclipse add option. I created a xml file under that named options.xml, its contents are,

<menu xmlns:android="http://schemas.android.com/apk/res/android">


<item android:title="Take Picture" android:id="@+id/camera" android:icon="@drawable/ic_menu_camera" android:showAsAction="ifRoom"></item>
</menu>

but whenever i try to add that R.java disappears from auto-generation. I do not understand this. I closed and reopened eclipse, tried fresh projects no luck.

my layout main.xml,

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

android:layout_width="fill_parent" android:layout_height="fill_parent"

android:orientation="horizontal">
<SurfaceView xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/preview"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    />

</LinearLayout>

If I delete the menu folder R appears.

  • 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-02T13:46:05+00:00Added an answer on June 2, 2026 at 1:46 pm

    Since you are programming for API 10 you cannot use android:showAsAction, that is introduced in API 11. Sorry.

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

Sidebar

Related Questions

I exported a build.xml file from an Eclipse/Android project (under Windows). Then I use
I'm trying to add external JAR file to eclipse android project. JAR package have
I'm working on an Android project in eclipse, and whenever I try to move
When I start a new Android project in Eclipse (Helios), the strings.xml has 2
I am trying to build my Android project with Ant. Whenever I use Eclipse
I have an Android 1.5 project in Eclipse and whenever I merely have an
So in my Eclipse android project I have a pdf file that I'd like
I have one Android Eclipse project without 'res' directory in it. It have only
When building Android project in Eclipse, Android SDK gives error like this: error: Description
Whenever I create a new Android project in Eclipse, it shows an error in

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.