Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/206.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 安卓操作栏_Android_Android Actionbar_Android Ui_Android Support Library_Android Actionbar Compat - Fatal编程技术网

Android 安卓操作栏

Android 安卓操作栏,android,android-actionbar,android-ui,android-support-library,android-actionbar-compat,Android,Android Actionbar,Android Ui,Android Support Library,Android Actionbar Compat,我正在尝试演示Android操作栏,并创建了一个应用程序来试用。我已经安装了该库并将其链接到该项目(我认为这是正确的),并且尽我所知正确设置了它。但问题是MainActivity无法加载任何主资源文件 主要活动布局: Create field 'activity_main' in type 'layout' 菜单xml文件: Create field 'menu' in type 'R' 清单中的主题: No resource found that matches the given n

我正在尝试演示Android操作栏,并创建了一个应用程序来试用。我已经安装了该库并将其链接到该项目(我认为这是正确的),并且尽我所知正确设置了它。但问题是MainActivity无法加载任何主资源文件

主要活动布局:

  Create field 'activity_main' in type 'layout'
菜单xml文件:

Create field 'menu' in type 'R'
清单中的主题:

No resource found that matches the given name ( at 'theme' with a value
'@style/Theme_appCompat_Light_DarkActionBar')
主布局和菜单xml都存在,但是我承认我不知道主题文件在哪里来确认它的存在,尽管我认为这不是问题所在

我已经拍摄了一张照片,显示了我的项目的配置

测试应用程序和appcompat文件夹存在于文件系统中的同一位置,生成路径和库条目看起来都是正确的。如果需要,我也可以附加这些配置的屏幕

我觉得这是某种配置错误,但我对android开发非常陌生,没有足够的关于项目结构的信息来了解我需要在哪里进行更改


任何帮助都将不胜感激

您的AndroidManifest.xml中似乎有错误。在xml文件中没有错误之前,Eclipse不会生成R(引用文件)文件

您还需要android-support-v13.jar库,因为其中也包含一些主题

如果这对清单中的主题不起作用,那么您需要在您的values文件夹中使用一个合适的themes.xml,该文件夹具有您要查找的主题名称。下面是一个例子:


<!-- 
    the theme applied to the application or activity 
-->    
<style name="CustomLightTheme" parent="@android:style/Theme.Holo.Light">

</style>