简体   繁体   English

两个AndroidManifest.xml文件,其中一个是相关的

[英]Two AndroidManifest.xml files, which one is relevant

I am learning to develop android apps from android site . 我正在学习从android站点开发android应用程序。 As you can see here they talk about AndroidManifest.xml . 正如您在这里看到的,他们谈论AndroidManifest.xml My project seems to have two such files , with diffferent content. 我的项目似乎有两个这样的文件,具有不同的内容。

One located at : workspace\\MyFirstApp 一个位于: workspace\\MyFirstApp

Having contents 有内容

<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="17" />

<application
    android:allowBackup="true"
    android:debuggable="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name="com.example.myfirstapp.MainActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

ANother located at workspace\\MyFirstApp\\bin and having below contents , in addition to what the first file has 除了第一个文件之外,另一个位于workspace\\MyFirstApp\\bin并且具有以下内容

    <activity
        android:name="com.example.myfirstapp.DisplayMessageActivity"
        android:label="@string/title_activity_display_message"
        android:parentActivityName="com.example.myfirstapp.MainActivity" >
        <meta-data
            android:name="android.support.PARENT_ACTIVITY"
            android:value="com.example.myfirstapp.MainActivity" />
    </activity>

I am not sure why there are two AndroidManifest.xml . 我不确定为什么有两个AndroidManifest.xml Also which one is my main one being used by my project? 还有哪一个是我项目使用的主要产品之一?

This workspace\\MyFirstApp\\bin is automatically build on Build where as workspace\\MyFirstApp this is your projects Manifest which you can modify and alter this is you main Manifest workspace\\MyFirstApp\\bin自动构建在Build中,其中作为workspace\\MyFirstApp这是您的项目Manifest ,您可以修改和更改这是您的主要Manifest

Note: * Bin * and Gen Contents are automatically generated You shall not bother about them you can check by Cleaning the project both got emptied and on Rebuilding or Running again Gen and Bin Contents are recreated 注意: * Bin *和Gen内容是自动生成的你不用担心它们你可以通过清理项目来检查它们是否已清空,重新建立或再次运行Gen和Bin内容被重新创建

运行应用程序时会自动创建bin文件夹。您无需为此烦恼。原始的Android清单文件是您工作区中的文件。您可以在那里进行所有可能的更改,当您运行应用程序时它会自动进行反映在您的bin文件夹中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM