Reputation: 53
I have changed targetSdkVersion and compileSdkVersion to 33,and minSdkVersion is 23 in build.gradle file and in AndroidManifest.xml, updated permissions like this
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.
Upvotes: 4
Views: 2095
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