0

Is there a way to have two AndroidManifest.xml files in one project?

In my manifest I define a service to provide a SyncAdapter looking like this:

        <service
            android:name=".data.sync.SyncService"
            android:exported="true">
            android:process=":sync">
            <intent-filter>
                <action android:name="android.content.SyncAdapter"/>
            </intent-filter>
            <meta-data
                android:name="android.content.SyncAdapter"
                android:resource="@xml/syncadapter"/>
        </service>

The problem with this is, that I am not able to debug the SyncAdapter hence it is running in a different process when debugging the application in Android Studio.

This is why I would like to have a second Manifest file in which I won't define this tag. This way I want to make sure not to forget to put it back before building the apk-file.

Chris
  • 515
  • 2
  • 6
  • 13
  • I don't think so. Why don't you just comment it out when debugging? – aProperFox Aug 01 '15 at 19:43
  • I was hoping to have a less manuell/error-prone approach. It is easy to forget to comment it back in. – Chris Aug 01 '15 at 19:58
  • Check out [this](http://stackoverflow.com/questions/29317668/how-can-i-have-different-manifest-files-for-the-release-and-debug-versions) answer – aProperFox Aug 01 '15 at 22:09

0 Answers0