Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/208.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/33.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
无法使用Eclipse IDE在ubuntu上构建新的Android应用程序项目_Android_Android Activity - Fatal编程技术网

无法使用Eclipse IDE在ubuntu上构建新的Android应用程序项目

无法使用Eclipse IDE在ubuntu上构建新的Android应用程序项目,android,android-activity,Android,Android Activity,我正在尝试构建一个项目,但在创建此错误显示时 [2015-04-12 11:38:25 - Em] /xxx/xxxxx/workspace/Em/res/values-v14/styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBa r’ 我不知道这是什么问题,但所有源代码标记都

我正在尝试构建一个项目,但在创建此错误显示时

[2015-04-12 11:38:25 - Em] /xxx/xxxxx/workspace/Em/res/values-v14/styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBa
r’

我不知道这是什么问题,但所有源代码标记都会像这样访问源代码“R”

protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_echile);-->Error "R."
        if (savedInstanceState == null) {
            getSupportFragmentManager().beginTransaction()
                    .add(R.id.container, new PlaceholderFragment()).commit();
        }
    }

这不是Ubuntu或Eclipse的问题。错误表明SDK找不到所需的资源,并且它是AppCompat资源,这意味着它包含在支持库中。您需要手动添加它,可以找到说明

如果您已经导入了它,但它不起作用,您可以试试这个


看起来,在创建Android项目时,您选择了使用黑暗主题。有时,主题资源不会自动加载。如果使用哪个主题对你来说并不重要,你可以选择
None
theme,因为它不需要加载额外的资源。

谢谢,我在Windows上也遇到过同样的问题,但我记不起当时的解决方案,但现在我永远不会忘记。