0

I recently added the expandable-menu-button which i got from github and the .jar library from search.maven.org to my android project but when i try to build and run the project, i get the error below:

E:\xdroid\appname\libs\expandable-button-menu-1.0.0-sources.jar(lt/lemonlabs/android/expandablebuttonmenu/ExpandableMenuOverlay.java):56: error: package R does not exist
        TypedArray a = context.getTheme().obtainStyledAttributes(attrs, R.styleable.ExpandableMenuOverlay, 0, 0);
                                                                         ^
E:\xdroid\appname\libs\expandable-button-menu-1.0.0-sources.jar(lt/lemonlabs/android/expandablebuttonmenu/ExpandableMenuOverlay.java):58: error: package R does not exist
            mAdjustViewSize = a.getBoolean(R.styleable.ExpandableMenuOverlay_adjustViewSize, true);
                                            ^
E:\xdroid\appname\libs\expandable-button-menu-1.0.0-sources.jar(lt/lemonlabs/android/expandablebuttonmenu/ExpandableMenuOverlay.java):59: error: package R does not exist
            dimAmount = a.getFloat(R.styleable.ExpandableMenuOverlay_dimAmount, DEFAULT_DIM_AMOUNT);

What am I doing wrong such that the R.java file is unavailable and how can i correct it? Thanks in advance.

Biko
  • 332
  • 3
  • 15
  • how you added the library ? was it through gradle or manually? – J.Vassallo Sep 30 '15 at 17:42
  • Exactly the same ways i have added other libraries...first I copy the .jar file to the libs folder then on android studio I right click on the .jar file and add it as a library – Biko Sep 30 '15 at 17:54
  • Possible duplicate of ["R cannot be resolved to a variable"?](http://stackoverflow.com/questions/7824730/r-cannot-be-resolved-to-a-variable) – Gabriel Rodriguez Sep 30 '15 at 17:59
  • I do not think it is a duplicate because this library makes calls from a different package name i.e. `lt.lemonlabs.android.expandablebuttonmenu` which is different from my package name and thus cannot access the default R.java file – Biko Sep 30 '15 at 18:04
  • you are still using eclipse? – J.Vassallo Sep 30 '15 at 18:37
  • No, I use android studio. I have used that process on 4 other libraries and I did not have any issues – Biko Sep 30 '15 at 18:40

0 Answers0