inflater.inflate(R.menu.main,menu)在ICS Android中的此行获取StackOverFlowError

时间:2014-09-03 10:17:15

标签: android stack-overflow

在某个特定设备的这一行获取StackOverFlow,我已经在MOTOG上测试了它并且它可以正常工作,但是当我在Micromax Canvas Old上测试时,它给出了:

  

StackOverflowError" 09-03 15:18:33.597:E / AndroidRuntime(25861):   java.lang.StackOverflowError 09-03 15:18:33.597:   E / AndroidRuntime(25861):at   android.content.res.Resources.getLayout(Resources.java:875)09-03   15:18:33.597:E / AndroidRuntime(25861):at   android.support.v7.internal.view.SupportMenuInflater.inflate(SupportMenuInflater.java:115)   09-03 15:18:33.597:E / AndroidRuntime(25861):at   com.nationalmicromarket.app.BaseActivity.onCreateOptionsMenu(BaseActivity.java:44)   09-03 15:18:33.597:E / AndroidRuntime(25861):at   android.app.Activity.onCreatePanelMenu(Activity.java:2458)09-03   15:18:33.597:E / AndroidRuntime(25861):at   android.support.v4.app.FragmentActivity.onCreatePanelMenu(FragmentActivity.java:224)   09-03 15:18:33.597:E / AndroidRuntime(25861):at   android.support.v7.app.ActionBarActivity.superOnCreatePanelMenu(ActionBarActivity.java:233)   09-03 15:18:33.597:E / AndroidRuntime(25861):at   android.support.v7.app.ActionBarActivityDelegateICS.onCreatePanelMenu(ActionBarActivityDelegateICS.java:146)   09-03 15:18:33.597:E / AndroidRuntime(25861):at   android.support.v7.app.ActionBarActivity.onCreatePanelMenu(ActionBarActivity.java:200)   09-03 15:18:33.597:E / AndroidRuntime(25861):at   android.support.v7.app.ActionBarActivityDelegateICS $ WindowCallbackWrapper.onCreatePanelMenu(ActionBarActivityDelegateICS.java:293)   09-03 15:18:33.597:E / AndroidRuntime(25861):at   com.android.internal.policy.impl.PhoneWindow.preparePanel(PhoneWindow.java:391)   09-03 15:18:33.597:E / AndroidRuntime(25861):at   com.android.internal.policy.impl.PhoneWindow.invalidatePanelMenu(PhoneWindow.java:747)   09-03 15:18:33.597:E / AndroidRuntime(25861):at   android.app.Activity.invalidateOptionsMenu(Activity.java:2566)09-03   15:18:33.597:E / AndroidRuntime(25861):at   com.nationalmicromarket.app.fragments.CartFragment.onCreateOptionsMenu(CartFragment.java:76)   09-03 15:18:33.597:E / AndroidRuntime(25861):at   android.support.v4.app.Fragment.performCreateOptionsMenu(Fragment.java:1582)   09-03 15:18:33.597:E / AndroidRuntime(25861):at   android.support.v4.app.FragmentManagerImpl.dispatchCreateOptionsMenu(FragmentManager.java:1956)   09-03 15:18:33.597:E / AndroidRuntime(25861):at   android.support.v4.app.FragmentActivity.onCreatePanelMenu(FragmentActivity.java:225)   09-03 15:18:33.597:E / AndroidRuntime(25861):at   android.support.v7.app.ActionBarActivity.superOnCreatePanelMenu(ActionBarActivity.java:233)   09-03 15:18:33.597:E / AndroidRuntime(25861):at   android.support.v7.app.ActionBarActivityDelegateICS.onCreatePanelMenu(ActionBarActivityDelegateICS.java:146)   09-03 15:18:33.597:E / AndroidRuntime(25861):at   android.support.v7.app.ActionBarActivity.onCreatePanelMenu(ActionBarActivity.java:200)   09-03 15:18:33.597:E / AndroidRuntime(25861):at   android.support.v7.app.ActionBarActivityDelegateICS $ WindowCallbackWrapper.onCreatePanelMenu(ActionBarActivityDelegateICS.java:293)   09-03 15:18:33.597:E / AndroidRuntime(25861):at   com.android.internal.policy.impl.PhoneWindow.preparePanel(PhoneWindow.java:391)   09-03 15:18:33.597:E / AndroidRuntime(25861):at   com.android.internal.policy.impl.PhoneWindow.invalidatePanelMenu(PhoneWindow.java:747)   09-03 15:18:33.597:E / AndroidRuntime(25861):at   android.app.Activity.invalidateOptionsMenu(Activity.java:2566)09-03   15:18:33.597:E / AndroidRuntime(25861):at   com.nationalmicromarket.app.fragments.CartFragment.onCreateOptionsMenu(CartFragment.java:76)   09-03 15:18:33.597:E / AndroidRuntime(25861):at   android.support.v4.app.Fragment.performCreateOptionsMenu(Fragment.java:1582)   09-03 15:18:33.597:E / AndroidRuntime(25861):at   android.support.v4.app.FragmentManagerImpl.dispatchCreateOptionsMenu(FragmentManager.java:1956)   09-03 15:18:33.597:E / AndroidRuntime(25861):at   android.support.v4.app.FragmentActivity.onCreatePanelMenu(FragmentActivity.java:225)   09-03 15:18:33.597:E / AndroidRuntime(25861):at   android.support.v7.app.ActionBarActivity.superOnCreatePanelMenu(ActionBarActivity.java:233)   09-03 15:18:33.597:E / AndroidRuntime(25861):at   android.support.v7.app.ActionBarActivityDelegateICS.onCreatePanelMenu(ActionBarActivityDelegateICS.java:146)   09-03 15:18:33.597:E / AndroidRuntime(25861):at   android.support.v7.app.ActionBarActivity.onCreatePanelMenu(ActionBarActivity.java:200)   09-03 15:18:33.597:E / AndroidRuntime(25861):at   android.support.v7.app.ActionBarActivityDelegateICS $ WindowCallbackWrapper.onCreatePanelMenu(ActionBarActivityDelegateICS.java:293)   09-03 15:18:33.597:E / AndroidRuntime(25861):at   com.android.internal.policy.impl.PhoneWindow.preparePanel(PhoneWindow.java:391)   09-03 15:18:33.597:E / AndroidRuntime(25861):at   com.android.internal.policy.impl.PhoneWindow.invalidatePanelMenu(PhoneWindow.java:747)   09-03 15:18:33.597:E / AndroidRuntime(25861):at   android.app.Activity.invalidateOptionsMenu(Activity.java:2566)09-03   15:18:33.597:E / AndroidRuntime(25861):at   com.nationalmicromarket.app.fragments.CartFragment.onCreateOptionsMenu(CartFragment.java:76)   09-03 15:18:33.597:E / AndroidRuntime(25861):at   android.support.v4.app.Fragment.performCreateOptionsMenu(Fragment.java:1582)   09-03 15:18:33.597:E / AndroidRuntime(25861):at   android.support.v4.app.FragmentManagerImpl.dispatchCreateOptionsMenu(FragmentManager.java:1956)   09-03 15:18:33.597:E / AndroidRuntime(25861):at   android.support.v4.app.FragmentActivity.onCreatePanelMenu(FragmentActivity.java:225)   09-03 15:18:33.597:E / AndroidRuntime(25861):at   android.support.v7.app.ActionBarActivity.superOnCreatePanelMenu(ActionBarActivity.java:233)   09-03 15:18:33.597:E / AndroidRuntime(25861):at   android.support.v7.app.ActionBarActivityDelegateICS.onCreatePanelMenu(ActionBarActivityDelegateICS.java:146)   09-03 15:18:33.597:E / AndroidRuntime(25861):at   android.support.v7.app.ActionBarActivity.onCreatePanelMenu(ActionBarActivity.java:200)   09-03 15:18:33.597:E / AndroidRuntime(25861):at   android.support.v7.app.ActionBarActivityDelegateICS $ WindowCallbackWrapper.onCreatePanelMenu(ActionBarActivityDelegateICS.java:293)   09-03 15:18:33.597:E / AndroidRuntime(25861):at   com.android.internal.policy.impl.PhoneW"

0 个答案:

没有答案