新项目缺少xml文件和文件夹

时间:2013-06-07 05:57:56

标签: android xml android-studio new-project

在Android Studio上创建新项目时,我的新项目中缺少一些文件,如:

xml文件:
activity_main.xml,AndroidManifest.xml

res文件夹中的文件夹:
布局,价值

我不知道是否还有更多东西缺失。我正在使用Windows 8 Pro

2 个答案:

答案 0 :(得分:0)

res文件夹中唯一需要的文件夹可能是“values”,里面有“strings.xml”。并且您需要在值fodler中使用“styles.xml”。将此文本复制到styles.xml:

    <resources>

    <!--
        Base application theme, dependent on API level. This theme is replaced
        by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
    -->
    <style name="AppBaseTheme" parent="android:Theme.Light">
        <!--
            Theme customizations available in newer API levels can go in
            res/values-vXX/styles.xml, while customizations related to
            backward-compatibility can go here.
        -->
    </style>

    <!-- Application theme. -->
    <style name="AppTheme" parent="AppBaseTheme">
        <!-- All customizations that are NOT specific to a particular API-level can go here. -->
    </style>

</resources>

标签也必须放在strings.xml文件中。 谷歌搜索androidmanifast xml文件并将其复制到它。

答案 1 :(得分:0)

您还可以在创建项目时检查设置,应该有一个类似下面的设置: “生成xml文件”

只是一些想法

相关问题