misguided
misguided

Reputation: 3799

Two AndroidManifest.xml files, which one is relevant

I am learning to develop android apps from android site. As you can see here they talk about AndroidManifest.xml . My project seems to have two such files , with diffferent content.

One located at : 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

    <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 . Also which one is my main one being used by my project?

Upvotes: 1

Views: 913

Answers (2)

Mohit
Mohit

Reputation: 11324

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

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

Upvotes: 2

Siddharth_Vyas
Siddharth_Vyas

Reputation: 10100

bin folder is automatically created when you run your application.You don't need to bother about that.The original Android manifest file is the one in your work space.You can make all possible changes there and when you run your application it will automatically reflect in your bin folder.

Upvotes: 2

Related Questions