Skip to content

Manifest Merger Conflict in Datatrans Android SDK (v3.10.0) #37

@drezzzik

Description

@drezzzik

Summary

There is a discrepancy between the recommended integration steps in the Datatrans Android Integration Documentation and the actual AndroidManifest.xml bundled with the ch.datatrans:android-sdk:3.10.0 library. This causes a manifest merger failure during the Android build process.

Description

The documentation states that for the ExternalProcessRelayActivity, the following attributes are required:

  • android:launchMode="singleTask"
  • android:theme="@android:style/Theme.Translucent.NoTitleBar"

However, the manifest inside the v3.10.0 AAR defines them differently:

  • android:launchMode="singleTop"
  • android:theme="@style/Theme.AppCompat.DayNight.NoActionBar"

When an integrating app follows the documentation and declares the activity in its own manifest with the recommended values, the Android Gradle Plugin throws a merger error because of the conflicting values.

Error Output

AndroidManifest.xml:12:13-44 Error: Attribute activity#ch.datatrans.payment.ExternalProcessRelayActivity@launchMode value=(singleTask) from [:destinationPaymentImpl] AndroidManifest.xml:12:13-44 is also present at [ch.datatrans:android-sdk:3.10.0] AndroidManifest.xml:35:13-43 value=(singleTop). Suggestion: add 'tools:replace="android:launchMode"' to <activity> element at AndroidManifest.xml to override. AndroidManifest.xml:13:13-72 Error: Attribute activity#ch.datatrans.payment.ExternalProcessRelayActivity@theme value=(@android:style/Theme.Translucent.NoTitleBar) from [:destinationPaymentImpl] AndroidManifest.xml:13:13-72 is also present at [ch.datatrans:android-sdk:3.10.0] AndroidManifest.xml:36:13-72 value=(@style/Theme.AppCompat.DayNight.NoActionBar). Suggestion: add 'tools:replace="android:theme"' to <activity> element at AndroidManifest.xml to override.

Workaround

Either
tools:replace="android:launchMode,android:theme
or to align with activity config from SDK.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions