Skip to content

fix: Support for Android 12 #290

@HadiHassan22

Description

@HadiHassan22

Description
When running a new app on android 12 created using very_good create the application fails to install and run.

Steps To Reproduce

  1. Create a flutter app using very_good create
  2. Run the app on an android emulator or device using android 12

Expected Behavior
Expected to install and run the starter app.

Additional Context

Console log:

✓  Built build[/app/outputs/flutter-apk/app-development-debug.apk.]()
Error: ADB exited with exit code 1
Performing Streamed Install

adb: failed to install [/Users/hadihassan/Workspace/very_good_apps/new_agents/agents/build/app/outputs/flutter-apk/app.apk](): Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: [/data/app/vmdl8328250.tmp/base.apk]() (at Binary XML file line #21): com.fleetrunnr.agents.MainActivity: Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present]
Error launching application on SM G975F.

Proposed solution:

Add the below code in activity inside AndroidManifest.xml:
android:exported="true"

Example:

<activity
    android:name=".MainActivity"
    android:exported="true"
    android:launchMode="singleTop"
    android:theme="@style/LaunchTheme"
</activity>

Metadata

Metadata

Assignees

Labels

bugSomething isn't working as expected

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions