Android外部库R类没有加载

时间:2015-09-30 17:35:29

标签: android android-library

我最近添加了可扩展菜单按钮,我从github和.jar库从 search.maven.org 添加到我的android项目但是当我尝试构建并运行项目时,我得到了错误如下:

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);

我做错了什么,以致R.java文件不可用,我该如何纠正?提前致谢。

0 个答案:

没有答案