Failed to build after upgrade to flutter 1.2 - flutter

../../flutter/.pub-cache/hosted/pub.dartlang.org/flutter_datetime_picker-1.3.8/lib/src/datetime_picker_theme.dart:6:28: Error: Type 'DiagnosticableMixin' not found.
class DatePickerTheme with DiagnosticableMixin {
^^^^^^^^^^^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/flutter_datetime_picker-1.3.8/lib/src/datetime_picker_theme.dart:6:7: Error: The type 'DiagnosticableMixin' can't be mixed in.
class DatePickerTheme with DiagnosticableMixin {
^
FAILURE: Build failed with an exception.
* Where:
Script '/home/tfradebe/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 896
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command '/home/tfradebe/flutter/bin/flutter'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 28s
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 29.1s
Exception: Gradle task assembleDebug failed with exit code 1

There is a fix in progress to solve this issue that affected many plugins. In the meantime, you can include the reference to flutter_datetime_picker like this
flutter_datetime_picker:
git:
url: https://github.com/ditheshthegreat/flutter_datetime_picker # Repo
ref: patch-1 # Branch name
This is the github related ticket

Related

How to solve "Type 'GenerateAppTitle' not found"?

I would like to start a Flutter counter app. So I prepared all and started the flutter counter project.
Then I got this error:
Launching lib\main.dart on Android SDK built for x86 in debug mode...
Running Gradle task 'assembleDebug'...
../../../../../flutter/packages/flutter/lib/src/material/app.dart:365:9: Error: Type 'GenerateAppTitle' not found.
final GenerateAppTitle? onGenerateTitle;
^^^^^^^^^^^^^^^^
../../../../../flutter/packages/flutter/lib/src/cupertino/app.dart:292:9: Error: Type 'GenerateAppTitle' not found.
final GenerateAppTitle? onGenerateTitle;
^^^^^^^^^^^^^^^^
../../../../../flutter/packages/flutter/lib/src/material/app.dart:365:9: Error: 'GenerateAppTitle' isn't a type.
final GenerateAppTitle? onGenerateTitle;
^^^^^^^^^^^^^^^^
../../../../../flutter/packages/flutter/lib/src/cupertino/app.dart:292:9: Error: 'GenerateAppTitle' isn't a type.
final GenerateAppTitle? onGenerateTitle;
^^^^^^^^^^^^^^^^
FAILURE: Build failed with an exception.
* Where:
Script 'C:\Users\{mywindowsname}\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1156
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\Users\{mywindowsname}\flutter\bin\flutter.bat'' finished with non-zero exit value 1
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 20s
Exception: Gradle task assembleDebug failed with exit code 1
I already tried everything within the following error question on "Execution failed for task ':app:compileFlutterBuildDebug'." error message until Jakub S. answer to remove .gradle folder.
how to solve Execution failed for task ':app:compileFlutterBuildDebug'
Currently I think the problem is with the '"GenerateAppTitle" not found' message.
I tried the counter app on VS Code and Android Studio.
Nothing worked. What could the solution be?

Dart uuid can't be extended

I updated dependencies by dart pub upgrade, but here i thought due to some cache already there causing this error. i have tried dart clean cache but problem is still there. kindly take this issue underconsideration problem statement is mentioned below. It seems like my uuid class can't extend umodifiableuint8listview but class is not even present in the code
**../../flutter/.pub-cache/hosted/pub.dartlang.org/uuid_enhanced-3.0.2/lib/uuid.dart:9:7: Error: 'UnmodifiableUint8ListView' is restricted and can't be extended or implemented.
class Uuid extends UnmodifiableUint8ListView {
^**
2
FAILURE: Build failed with an exception.
* Where:
Script 'C:\Users\hp\Documents\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1005
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\Users\hp\Documents\flutter\bin\flutter.bat'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 54s
Exception: Gradle task assembleDebug failed with exit code 1

how to fix the below error after upgrading my flutter

/C:/Users/Funmi/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/isolate_bloc-1.0.4/lib/src/common/isolate/platform_channel/isolated_platform_channel_middleware.dart:29:25: Error: The method 'setMockMessageHandler' isn't defined for the class 'BinaryMessenger'.
'BinaryMessenger' is from 'package:flutter/src/services/binary_messenger.dart' ('/C:/Users/Funmi/flutter/packages/flutter/lib/src/services/binary_messenger.dart').
Try correcting the name to the name of an existing method, or defining a method named 'setMockMessageHandler'.
platformMessenger.setMockMessageHandler(channel, (message) {
^^^^^^^^^^^^^^^^^^^^^
FAILURE: Build failed with an exception.
Where:
Script 'C:\Users\Funmi\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1052
What went wrong:
Execution failed for task ':app:compileFlutterBuildRelease'.
Process 'command 'C:\Users\Funmi\flutter\bin\flutter.bat'' finished with non-zero exit value 1
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 39s
Running Gradle task 'assembleRelease'... 40.2s
Gradle task assembleRelease failed with exit code 1
Finished with error: Gradle task assembleRelease failed with exit code 1
check this website and apply it by order some values end of the implementation or classpath could be old , search and change compared to depracated.

Could not run Flutter app after a long time

i have developed an application before two months, i need to add a new feature today so i opened the project to day. but i cannot compile the project , it throws errors only and i don't understand how to resolve it. i have cached_network_image , youtube_player_flutter packages.
i have pasted my error log below
Compiler message:
../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/youtube_player_flutter-
5.2.0/lib/src/player/raw_youtube_player.dart:55:30: Error: Getter not found: 'suspending'.
case AppLifecycleState.suspending:
^^^^^^^^^^
Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
build failed.
FAILURE: Build failed with an exception.
* Where:
Script '/Users/flutter/Developer/flutter/packages/flutter_tools/gradle/flutter.gradle' line:
780
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command '/Users/flutter/Developer/flutter/bin/flutter'' finished with non-zero
exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to
get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 23s
FAILURE: Build failed with an exception.
* What went wrong:
Could not get unknown property 'ANDROIDX_WARNING' for project ':youtube_player' of type
org.gradle.api.Project.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to
get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 23s
Finished with error: Gradle task assembleDebug failed with exit code 1

Finished with error: Gradle task assembleDebug failed with exit code 1 in Flutter

Compiler message:
lib/range_slider.dart:2:8: Error: Can't access platform private library.
import 'dart:_http';
^
Compiler failed on /Users/user/FlutterApp/cliniva_doctor_app/lib/main.dart
FAILURE: Build failed with an exception.
Where:
Script '/Users/user/Library/FlutterSDK/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 782
What went wrong:
Execution failed for task ':app:compileFlutterBuildDebugArm64'.
Process 'command '/Users/user/Library/FlutterSDK/flutter/bin/flutter'' finished with non-zero exit value 1
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 12s
Finished with error: Gradle task assembleDebug failed with exit code 1