Microsoft AppCenter in Flutter mysteriously adding tags for "DeepLinkActivity" and "DownloadManagerReceiver"

31 views Asked by At

On this page there is advice on how to incorporate Microsoft's AppCenter platform into a Flutter project. Someone took a stab at this back in May 2023 and had some success, it seems.

But as of December 2023, there has been a new twist, rendering the original solution unworkable. When I run flutter build apk, I get the following messages (all in red):

/Users/nf67322/Documents/FlutterProjects/FlutterTest1/flutter_test_1/android/app/src/main/AndroidManifest.xml:32:9-46:20 Error:
    android:exported needs to be explicitly specified for element <activity#com.microsoft.appcenter.distribute.DeepLinkActivity>. 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.
/Users/nf67322/Documents/FlutterProjects/FlutterTest1/flutter_test_1/android/app/src/main/AndroidManifest.xml:48:9-53:20 Error:
    android:exported needs to be explicitly specified for element <receiver#com.microsoft.appcenter.distribute.DownloadManagerReceiver>. 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.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processReleaseMainManifest'.
> Manifest merger failed with multiple errors, see logs

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 13s

Processing apparently now generates two other modules/tags "under the covers" that I can't locate anywhere in the Flutter project, and inserts them (somehow) in the AndroidManifest.xml file. They are:

<activity#com.microsoft.appcenter.distribute.DeepLinkActivity>

and

<receiver#com.microsoft.appcenter.distribute.DownloadManagerReceiver>

A global search of my Flutter project files turns up nothing for such tags. This is frustrating because I don't have anything else to go on, and was heretofore unaware that this sort of hidden processing took place.

In the matter of trying to resolve the matter on my own, I tried manually adding the two com.microsoft.appcenter tags to AndroidManifest.xml, but compilation complained that the resulting manifest file was now no longer valid.

Incorporating AppCenter into Flutter shouldn't be this tricky. It doesn't seem to be well documented, but the little bit I've seen hasn't provided a conclusive solution to situations like this.

Is this an issue that, simply, need to be brought to Microsoft's attention as a bug? Or is there yet another workaround to resolve it? Anyone from Microsoft, especially the division working on AppCenter, can you offer any comment?

Thanks!

0

There are 0 answers