Suma
Suma

Reputation: 53

After upgrading target sdk version to 33(android 13), Flutter app is installing but not launching automatically

I have changed targetSdkVersion and compileSdkVersion to 33,and minSdkVersion is 23 in build.gradle file and in AndroidManifest.xml, updated permissions like this

AndroidManifest.xml

When I do flutter run, App is installing in emulator(api level 33) and apk also generating but not launching (opening) automatically.

If I open manually by clicking on it,then app is opening. Flutter run is stucking at Installing build\app\outputs\apk\app.apk...,

I have attached the image below.

screenshoot

Upvotes: 4

Views: 2095

Answers (1)

Martin Olivari
Martin Olivari

Reputation: 496

Add the next line to android/app/src/AndroidManifest.xml

<action android:name="android.intent.action.RUN"/>

In this part:

<intent-filter>
    <action android:name="android.intent.action.MAIN"/>
    <action android:name="android.intent.action.RUN"/>
    <category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>

I'm ussing flutter 1.22 and I changed the targetSdkVersion 28 to targetSdkVersion 33. This is the only fix that worked for me, for auto launching the app.

Remember to use flutter run -v in console to see what is happening.

In my case, the error was:

Error type 3
Error: Activity class {} does not exist.

Upvotes: 0

Related Questions