App installation error : INSTALL_PARSE_FAILED_MANIFEST_MALFORMED
1,477
Under this line android:name=".MainActivity"
, add another line like this
android:exported="true"
Happy Coding!
Author by
Kavishka Rajapakshe
Updated on January 04, 2023Comments
-
Kavishka Rajapakshe over 1 year
When I try to run my flutter app on my phone, I get this error
Error: ADB exited with exit code 1 Performing Streamed Install adb: failed to install C:\Users\kavis\OneDrive\Desktop\New folder\care_receiver_app\ss_carereceiver_app\build\app\outputs\flutter-apk\app.apk: Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl378681921.tmp/base.apk (at Binary XML file line #26): com.owaslo.sukithasagayo.carereceiver.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 Pixel 6.
I read many other questions about it here but I didn't find a solution so far, could anyone have a look at my manifest and tell me what I did wrong?
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.owaslo.sukithasagayo.carereceiver"> <application android:label="Sukitha Sagayo" android:icon="@mipmap/ic_launcher"> <activity android:name=".MainActivity" android:launchMode="singleTop" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize"> <meta-data android:name="io.flutter.embedding.android.NormalTheme" android:resource="@style/NormalTheme" /> <meta-data android:name="io.flutter.embedding.android.SplashScreenDrawable" android:resource="@drawable/launch_background" /> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> </activity> <meta-data android:name="flutterEmbedding" android:value="2" /> </application> </manifest>
Below is a screenshot of the file structure Thank you in advance :)