Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting below error. #2

Closed
pinvisible opened this issue Aug 9, 2016 · 4 comments
Closed

Getting below error. #2

pinvisible opened this issue Aug 9, 2016 · 4 comments

Comments

@pinvisible
Copy link

java.lang.NoSuchFieldError: No static field menu_add of type I in class Lcom/nguyenhoanglam/imagepicker/R$id; or its superclasses (declaration of 'com.nguyenhoanglam.imagepicker.R$id' appears in /data/data/com.trinityholisticsolutions.poojamedimart/files/instant-run/dex/slice-slice_6-classes.dex)
at com.nguyenhoanglam.imagepicker.activity.ImagePickerActivity.onCreateOptionsMenu(ImagePickerActivity.java:145)
at android.app.Activity.onCreatePanelMenu(Activity.java:2850)
at android.support.v4.app.FragmentActivity.onCreatePanelMenu(FragmentActivity.java:358)
at android.support.v7.view.WindowCallbackWrapper.onCreatePanelMenu(WindowCallbackWrapper.java:88)
at android.support.v7.app.AppCompatDelegateImplBase$AppCompatWindowCallbackBase.onCreatePanelMenu(AppCompatDelegateImplBase.java:270)
at android.support.v7.view.WindowCallbackWrapper.onCreatePanelMenu(WindowCallbackWrapper.java:88)
at android.support.v7.app.ToolbarActionBar.populateOptionsMenu(ToolbarActionBar.java:454)
at android.support.v7.app.ToolbarActionBar$1.run(ToolbarActionBar.java:61)

@AstonBraham
Copy link

Same here...

I have found a quick dirty trick you can use while the author fixes this..
1- Rename your menu_main.xml to somethink like menu_principal.xml
2 - Copy menu_main.xml from this library's res/menu forlder to you app's res/menu folder and it should be done

@nguyenhoanglam
Copy link
Owner

nguyenhoanglam commented Aug 10, 2016

@AstonBraham Do you have any solutions for this error without renaming the menu file?

@AstonBraham
Copy link

Sure,

You can dynamically add the menu items..
Thus, you won't need to replace/reame/override ressource files..
I can open a pull request if needed to fix it..
I also noticed that the ImagePickerActivity doesn't use the default app theme

2016-08-10 2:38 UTC, Nguyen Hoang Lam notifications@github.com:

@AstonBraham Do you have any solution for this error without renaming the
menu file?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#2 (comment)

@nguyenhoanglam
Copy link
Owner

@pinvisible I've fixed the error. Please check it out and close this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants