Skip to content

Instantly share code, notes, and snippets.

@aduquet
Created September 29, 2022 14:58
Show Gist options
  • Save aduquet/8ba8d58131037860c04244200fb496e8 to your computer and use it in GitHub Desktop.
Save aduquet/8ba8d58131037860c04244200fb496e8 to your computer and use it in GitHub Desktop.
Build grade failure after Flutter update
I was getting this error after updateing dart and flutter project
android:exported needs to be explicitly specified for element
<activity#androidx.test.core.app.InstrumentationActivityInvoker$EmptyFloatingActivity>.
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.
After searching and trying many things, adding these other activities solved the problem:
<activity
android:name="androidx.test.core.app.InstrumentationActivityInvoker$BootstrapActivity"
android:exported="false" />
<activity
android:name="androidx.test.core.app.InstrumentationActivityInvoker$EmptyActivity"
android:exported="false" />
<activity
android:name="androidx.test.core.app.InstrumentationActivityInvoker$EmptyFloatingActivity"
android:exported="false" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment