error after updating minsdkversion in flutter 2.8
279
Buddy you just need to migrate your project to androidX
open android directory of your project in android studio
wait for gradle to finish its task
then go to tools -> migrate to androidX
click migrate
click do refactor
or you can simply follow steps from following answer https://stackoverflow.com/a/54857699/16793736
Author by
Student
Updated on January 02, 2023Comments
-
Student over 1 year
I am a beginner in flutter. I have update minSdkVersion from 19 to 21 and getting the following error. Please Please help. any kind of help is much appreciated. Thank you in advance.
Manifest merger failed : Attribute application@label value=(Car_Wash_App) from AndroidManifest.xml:11:9-37 is also present at [org.jfrog.cardinalcommerce.gradle:cardinalmobilesdk:2.2.4-1] AndroidManifest.xml:15:9-41 value=(@string/app_name). Suggestion: add 'tools:replace="android:label"' to <application> element at AndroidManifest.xml:9:5-48:19 to override.
here is the manifest file
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.Car_Wash_App"> <!-- io.flutter.app.FlutterApplication is an android.app.Application that calls FlutterMain.startInitialization(this); in its onCreate method. In most cases you can leave this as-is, but you if you want to provide additional functionality it is fine to subclass or reimplement FlutterApplication and put your custom class here. --> <application android:name="io.flutter.app.FlutterApplication" android:label="Car_Wash_App" android:icon="@mipmap/ic_launcher" tools:replace="android:label"> <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"> <!-- Specifies an Android theme to apply to this Activity as soon as the Android process has started. This theme is visible to the user while the Flutter UI initializes. After that, this theme continues to determine the Window background behind the Flutter UI. --> <meta-data android:name="io.flutter.embedding.android.NormalTheme" android:resource="@style/NormalTheme" /> <!-- Displays an Android View that continues showing the launch screen Drawable until Flutter paints its first frame, then this splash screen fades out. A splash screen is useful to avoid any visual gap between the end of Android's launch screen and the painting of Flutter's first frame. --> <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> <!-- Don't delete the meta-data below. This is used by the Flutter tool to generate GeneratedPluginRegistrant.java --> <meta-data android:name="flutterEmbedding" android:value="2" /> </application>
-
Kumar Lokesh Rathod over 2 yearsplease send your AndroidManifest file.
-
Student over 2 yearsI have updated the Question. Any suggestion now?
-
Kumar Lokesh Rathod over 2 yearsAdd this line xmlns:tools="schemas.android.com/tools" or Remove the tools:replace="android:label"
-
Student over 2 yearswhere i have to put xmlns:tool line?
-
Kumar Lokesh Rathod over 2 years<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="schemas.android.com/apk/res/android" package="com.example.name" xmlns:tools="schemas.android.com/tools">
-
Student over 2 yearsstill same error. kindly help
-
-
Student over 2 yearsafter adding that attribute, I am getting this error "org.xml.sax.SAXParseException; systemId: file:/D:/AndriodProjects/Car_Wash_App/android/app/src/main/AndroidManifest.xml; lineNumber: 12; columnNumber: 39; The prefix "tools" for attribute "tools:replace" associated with an element type "application" is not bound."
-
Shailandra Rajput over 2 yearsadd xmlns:tools="schemas.android.com/tools" in your manifest top Like -: <manifest xmlns:android="schemas.android.com/apk/res/android" package="com.yourpackage" xmlns:tools="schemas.android.com/tools">