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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T23:58:53+00:00 2026-06-12T23:58:53+00:00

menu/activity_main.xml: <menu xmlns:android=http://schemas.android.com/apk/res/android> <item android:id=@+id/menu_settings android:title=@string/menu_settings android:showAsAction=never /> <item android:id=@+id/menu_save_log android:title=@string/menu_save_log android:showAsAction=never /> </menu>

  • 0

menu/activity_main.xml:

<menu xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:id="@+id/menu_settings"
        android:title="@string/menu_settings"
        android:showAsAction="never" />
    <item android:id="@+id/menu_save_log"
        android:title="@string/menu_save_log"
        android:showAsAction="never" />
</menu>

MainActivity.java:

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


@Override
public boolean onOptionsItemSelected(MenuItem item) {

    switch (item.getItemId()) {
    case R.id.menu_settings:      // OK
        break;
    case R.id.menu_save_log:      // menu_save_log cannot be resolved or is not a field
        break;
    }

    return true;
}

Why menu_save_log is not recognized?

Additional information. R.java:

public static final class menu {
    public static final int activity_main=0x7f070000;
}

R.java is not updated. Why?

  • 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-12T23:58:54+00:00Added an answer on June 12, 2026 at 11:58 pm

    Not sure what it could be, but it is quite likely that Eclipse/Android Studio did not yet recognize the new ID. Best thing to do is:

    • Make sure your menu file is saved;
    • Try rebuilding the project;

    In Eclipse:

    project --> clean...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Please have a look at the following code activity_main.xml <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android xmlns:tools=http://schemas.android.com/tools android:layout_width=match_parent android:layout_height=match_parent
activity_main.xml : <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=fill_parent android:layout_height=fill_parent android:orientation=horizontal > <ViewFlipper android:layout_margin=6dip android:id=@+id/view_flipper android:layout_width=wrap_content android:layout_height=wrap_content> <ImageView
Please have a look at the following code activity_main.xml <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android xmlns:tools=http://schemas.android.com/tools android:layout_width=match_parent android:layout_height=match_parent
Android SDK chose 2.3.3 AndroidManifest.xml file contents as follows <manifest xmlns:android=http://schemas.android.com/apk/res/android package=com.cyf.dialer android:versionCode=1 android:versionName=1.0
So, I have this code: package com.example.ponto_2d; import android.app.Activity; import android.view.Menu; import android.view.MotionEvent; import
I was following the Dev guide on Google's site: http://developer.android.com/training/basics/firstapp/starting-activity.html But whenever I press
I am developing an activity which have an Update button as menu for android.
package com.ave; import com.ave.R; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.ImageButton;
I did this menu and when I click a menu item nothing happens, it
I have the following activity... package org.dewsworld; import android.app.Activity; import android.os.Bundle; import android.view.Menu; import

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.