After upgrading to flutter 3.3.0 I got these errors - flutter

Currently, I am having this error:
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
../../../DEV/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_xlider-3.4.0/lib/flutter_xlider.dart:322:19: Error: No named parameter with the name 'overflow'.
overflow: Overflow.visible,
^^^^^^^^
../../../DEV/flutter/packages/flutter/lib/src/widgets/basic.dart:3787:3: Context: Found this candidate, but the arguments don't match.
Stack({
^^^^^
../../../DEV/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_rounded_date_picker-3.0.1/lib/src/flutter_rounded_button_action.dart:36:35: Error: The method 'FlatButton' isn't defined for the class 'FlutterRoundedButtonAction'.
- 'FlutterRoundedButtonAction' is from 'package:flutter_rounded_date_picker/src/flutter_rounded_button_action.dart' ('../../../DEV/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_rounded_date_picker-3.0.1/lib/src/flutter_rounded_button_action.dart').
I got these errors after upgrading flutter SDK from 2.2.3 to 3.3.0.

As pskink commented,
For the Stack widget specifically, if you previously used overflow: Overflow.visible, replace it with clipBehavior: Clip.none.
Find more about clip-behavior#migration-guide

Related

Compiler error in Flutter - .AAR .Metadata

I'm trying to compile my Flutter app but I get the following problem:
`Execution failed for task ':app:checkDebugAarMetadata'.
Multiple task action failures occurred:
A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
> The minCompileSdk (31) specified in a
dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
is greater than this module's compileSdkVersion (android-30).
Dependency: androidx.media2:media2-session:1.2.0.
When I update the compile SDK to 31, I get this message:
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
I have made changes to some of the gradle files and the warning messages have been removed but now the message below appears:
Running Gradle task 'assembleDebug'...
WARNING: [Processor] Library 'C:\.gradle\caches\modules-2\files-2.1\androidx.media2\media2-session\1.2.0\e110e7db678fbfc107af48fe6110e3cc713f4564\media2-session-1.2.0.aar' contains references to both AndroidX and old support library. This seems like the library is partially migrated. Jetifier will try to rewrite the library anyway.
Example of androidX reference: 'androidx/media2/session/MediaBrowser$Builder'
Example of support library reference: 'android/support/v4/media/session/MediaSessionCompat$Token'
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
√ Built build\app\outputs\flutter-apk\app-debug.apk.
Installing build\app\outputs\flutter-apk\app.apk...
W/FlutterActivityAndFragmentDelegate(13937): A splash screen was provided to Flutter, but this is deprecated. See flutter.dev/go/android-splash-migration for migration steps.
Debug service listening on ws://127.0.0.1:54956/S_ZxDICL0Ic=/ws
Syncing files to device AOSP on IA Emulator...
The Notes within the message are highlighted in red so I think this could possibly lead to the root cause/solution.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

How Fixing Warning Mapping New ns in Flutter?

i was updated my Android Studio and i face this type of issue in flutter
enter image description here
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: unexpected element (uri:"", local:"base-extension"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>
i was researched to fix that issue, using gradle version updated. but it was fix that flutter project only. i was tired, when i was run an new flutter project coming that same issue.
please, let me know,
how to fix this problem **permanently.**your help is so appreciated
Thank you in Advance.
Warning:Mapping new ns to old ns
Clean your project: Run flutter clean
Update gradle-wrapper.properties: Go to <project>/android/gradle/gradle-wrapper.properties , then set the value of distributionUrl to whatever latest gradle distribution is available; currently: https://services.gradle.org/distributions/gradle-7.5.1-bin.zip
Update build.gradle: Update <project>/android/build.gradle with the newest version of Gradle and Kotlin available.
classpath 'com.android.tools.build:gradle:7.3.1' (latest here) and ext.kotlin_version = '1.7.20' (latest here)
Final Step: Run flutter packages get, then run your flutter app. The first run may take more time as the IDE downloads new files.

running flutter in vs code shows Running with sound null safety

This is my first app in flutter using VS Code.
While I try to run my program via terminal using command flutter run shows:
Using hardware rendering with device Android SDK built for x86. If you notice graphics artifacts, consider enabling software rendering with"--enable-software-rendering".
Launching lib\main.dart on Android SDK built for x86 in debug mode...
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Running Gradle task 'assembleDebug'... 12.3s
√ Built build\app\outputs\flutter-apk\app-debug.apk.
Syncing files to device Android SDK built for x86... 9.4s
Flutter run key commands.
r Hot reload.
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).
Running with sound null safety
An Observatory debugger and profiler on Android SDK built for x86 is available at: http://127.0.0.1:63186/_rjqXM3bogc=/
The Flutter DevTools debugger and profiler on Android SDK built for x86 is available at:
http://127.0.0.1:9101?uri=http://127.0.0.1:63186/_rjqXM3bogc=/
After this nothing happens in terminal neither virtual device opens up. What is happening?
When running flutter doctor shows everything ok.
This error happens because of gradle version this is an error like this question just update your gradle in Your_Flutter_App > android > build.gradle, dependencies block to new versions like:
classpath 'com.android.tools.build:gradle:7.0.2'
check buildToolsVersion and compileSdkVersion in /android/app/build.gradle if didnt work.

Why is this Warning showing when I try to debug my Flutter application

This is not an error, this warning showing when I run or Debugging my app,
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
how do I fix and what's the exact problem is this?
Try upgrading the gradle wrapper version (gradle-wrapper.properties) and the gradle plugin version (/android/build.gradle) to the latest ones.
In gradle-wrapper.properties:
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
In /android/build.gradle:
classpath 'com.android.tools.build:gradle:7.1.0'

When I run flutter app shows Warning: Mapping new ns http://schemas.android.co

this pop ups when I run flutter app, I already installed all version of build tool of 30
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
I deleted platforms in android sdk and reinstall and it works fine now!