the menu does not show in the click

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



the menu does not show in the click



I am trying to create a menu in my application but when I run my application there is an error that appears and the error goes off when I click on the menu I understand dou comes this error and how I can correct it help me please...here is the error that appears
the menu code


<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/meu_showmsg"
android:icon="@drawable/menuh"
android:state_pressed="true"
android:title="@string/se_connecter"
app:showAsAction="always" />

</menu>



code Activity


@Override
protected void onCreate(Bundle savedInstanceState)
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home);


@Override
public boolean onOptionsItemSelected(MenuItem item)
switch (item.getItemId())
case R.id.meu_showmsg:
new MaterialDialog.Builder(this)
.title("Se connecter").show();
break;


return super.onOptionsItemSelected(item);


@Override
public boolean onCreateOptionsMenu(Menu menu)

getMenuInflater().inflate(R.menu.bein_markt_menu, menu);
return super.onCreateOptionsMenu(menu);

}



logcat


E/AndroidRuntime: FATAL EXCEPTION: main
Process: zied.aloui.beinmarkt, PID: 3780
android.content.res.Resources$NotFoundException: Resource ID #0x7f060063
at android.content.res.Resources.getValue(Resources.java:1351)
at android.support.v7.widget.AppCompatDrawableManager.loadDrawableFromDelegates(AppCompatDrawableManager.java:328)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:193)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:186)
at android.support.v7.content.res.AppCompatResources.getDrawable(AppCompatResources.java:100)
at android.support.v7.view.menu.MenuItemImpl.getIcon(MenuItemImpl.java:491)
at android.support.v7.view.menu.ActionMenuItemView.initialize(ActionMenuItemView.java:125)
at android.support.v7.widget.ActionMenuPresenter.bindItemView(ActionMenuPresenter.java:210)
at android.support.v7.view.menu.BaseMenuPresenter.getItemView(BaseMenuPresenter.java:187)
at android.support.v7.widget.ActionMenuPresenter.getItemView(ActionMenuPresenter.java:196)
at android.support.v7.widget.ActionMenuPresenter.flagActionItems(ActionMenuPresenter.java:476)
at android.support.v7.view.menu.MenuBuilder.flagActionItems(MenuBuilder.java:1164)
at android.support.v7.view.menu.BaseMenuPresenter.updateMenuView(BaseMenuPresenter.java:95)
at android.support.v7.widget.ActionMenuPresenter.updateMenuView(ActionMenuPresenter.java:229)
at android.support.v7.view.menu.MenuBuilder.dispatchPresenterUpdate(MenuBuilder.java:291)
at android.support.v7.view.menu.MenuBuilder.onItemsChanged(MenuBuilder.java:1051)
at android.support.v7.view.menu.MenuBuilder.startDispatchingItemsChanged(MenuBuilder.java:1078)
at android.support.v7.app.AppCompatDelegateImplV9.preparePanel(AppCompatDelegateImplV9.java:1419)
at android.support.v7.app.AppCompatDelegateImplV9.doInvalidatePanelMenu(AppCompatDelegateImplV9.java:1657)
at android.support.v7.app.AppCompatDelegateImplV9$1.run(AppCompatDelegateImplV9.java:134)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)





How are you implementing your code?
– Mbuodile Obiosio
Aug 7 at 19:42





Add the code that you have written.
– Raj
Aug 7 at 19:43




1 Answer
1



This:


android.content.res.Resources$NotFoundException: Resource ID #0x7f060063



and this:
at android.support.v7.view.menu.MenuItemImpl.getIcon(MenuItemImpl.java:491)

indicate that probably one of the icons you use for the menu does not exist, maybe you misspelled it.


at android.support.v7.view.menu.MenuItemImpl.getIcon(MenuItemImpl.java:491)






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

How to determine optimal route across keyboard