sumup / sumup-android-sdk

Sample App for the SumUp Android SDK
Other
105 stars 28 forks source link

Issue with Manifest Merger #167

Open vladaman opened 3 years ago

vladaman commented 3 years ago

Compiling project for SDK 31 with gradle 7.0 reports following issue:

app/src/main/AndroidManifest.xml Error: android:exported needs to be explicitly specified for . Apps targeting Android 12 and higher are required to specify an explicit value for android:exported when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.

https://github.com/sumup/sumup-android-sdk/blob/fb7331a250c92c2c83037fa987818a30b9805e7d/app/src/main/AndroidManifest.xml#L12

claudiopizzillo commented 2 years ago

Same for me targeting android 12: Manifest merger failed : android:exported needs to be explicitly specified for . Apps targeting Android 12 and higher are required to specify an explicit value for android:exported when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.

frogggias commented 2 years ago

Add this to your AndroidManifest.xml as a temporary workaround:

<activity 
    android:name="net.openid.appauth.RedirectUriReceiverActivity" 
    tools:node="merge" 
    android:exported="true" />
claudiopizzillo commented 2 years ago

Works., thanks.

giuseppesorce commented 2 years ago

workaround does't work for me.. i have one activity in my codebase.. so.. when add sumup dependency .. there is manifest merged problem. i hate it but i have to use targetSdk 30 👎

deveasyshop commented 2 years ago

Same issue here it's impossible to use sumump with android targetSdk 31 which is required for our application. When will you update the manifest ? It's a really simple action. Workaround is not working for me. It's not serious for a business application especially since the problem has been reported for a while

jnorkus commented 2 years ago

The workaround worked for me, just had to add this line to my manifest element.

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
...
xmlns:tools="http://schemas.android.com/tools"
...
>
NqCompiler commented 1 year ago

adding

  <activity
          android:name="net.openid.appauth.RedirectUriReceiverActivity"
          tools:replace="android:exported"
          android:exported="false">
  </activity>

to my AndroidManifest worked (inside <application>...</application>)

Since android:exported is not defined in the original manifest file, I assume the default value "false"

blackwiz4rd commented 1 year ago

adding

  <activity
          android:name="net.openid.appauth.RedirectUriReceiverActivity"
          tools:replace="android:exported"
          android:exported="false">
  </activity>

to my AndroidManifest worked (inside <application>...</application>)

Since android:exported is not defined in the original manifest file, I assume the default value "false"

This solution works for me (without the need to import auth-api-impl as suggested by Android studio) so thanks a lot.