Try adding the name of the type of the variable or the keyword var addPostFrameCallback - flutter-layout

/C:/development/flutter/packages/flutter/lib/src/widgets/binding.dart:271:3: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
Try adding the name of the type of the variable or the keyword 'var'.
addPostFrameCallback
^^^^^^^^^^^^^^^^^^^^
/C:/development/flutter/packages/flutter/lib/src/widgets/binding.dart:271:3: Error: Expected ';' after this.
addPostFrameCallback
^^^^^^^^^^^^^^^^^^^^
FAILURE: Build failed with an exception.
Where:
Script 'C:\development\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1102
What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
Process 'command 'C:\development\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 1m 18s
Exception: Gradle task assembleDebug failed with exit code 1

Related

assert pluginDirectory.exists()

FAILURE: Build failed with an exception.
* Where:
Script '/Users/elamraoui/flutter/packages/flutter_tools/gradle/app_plugin_loader.gradle' line: 33
* What went wrong:
A problem occurred evaluating script.
> assert pluginDirectory.exists()
| |
| false
C:\\src\\flutter_windows_3.3.5-stable\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\firebase_core-1.24.0\\/android
* 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 1s
Exception: Gradle task assembleDebug failed with exit code 1
I transfer my app from windows to Mac and I can't run my app in android studio now.
Someone can help me to understand what I'm supposed to do ?
flutter pub get didn't help.

Flutter code error - I am integrating (webrtc using nodejs) in flutter

C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_webrtc-0.8.12/lib/src/native/rtc_video_renderer_impl.dart:11:7: Error: The non-abstract class 'RTCVideoRenderer' is missing implementations for these members:
- VideoRenderer.onFirstFrameRendered
Try to either
- provide an implementation,
- inherit an implementation from a superclass or mixin,
- mark the class as abstract, or
- provide a 'noSuchMethod' implementation.
class RTCVideoRenderer extends ValueNotifier<RTCVideoValue>
^^^^^^^^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/webrtc_interface-1.0.8/lib/src/rtc_video_renderer.dart:51:13: Context: 'VideoRenderer.onFirstFrameRendered' is defined here.
Function? onFirstFrameRendered;
^^^^^^^^^^^^^^^^^^^^
FAILURE: Build failed with an exception.
* Where:
Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1159
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\src\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 7s
Exception: Gradle task assembleDebug failed with exit code 1
pls help me out
pls help me
to solve this error
flutter with webrtc using nodejs
Flutter code error - I am integrating (webrtc using nodejs) in flutter

dropdown_search-0.4.6 is giving error in Flutter. Error is given below

Running Gradle task 'assembly debug'...
/D:/flutter/.pub-cache/hosted/pub.dartlang.org/dropdown_search-0.4.6/lib/dropdown_search.dart:116:9: Error: Type 'AutovalidateMode' not found.
final AutovalidateMode autoValidateMode;
^^^^^^^^^^^^^^^^
/D:/flutter/.pub-cache/hosted/pub.dartlang.org/dropdown_search-0.4.6/lib/dropdown_search.dart:116:9: Error: 'AutovalidateMode' isn't a type.
final AutovalidateMode autoValidateMode;
^^^^^^^^^^^^^^^^
/D:/flutter/.pub-cache/hosted/pub.dartlang.org/dropdown_search-0.4.6/lib/dropdown_search.dart:149:29: Error: Getter not found: 'AutovalidateMode'.
this.autoValidateMode = AutovalidateMode.disabled,
^^^^^^^^^^^^^^^^
/D:/flutter/.pub-cache/hosted/pub.dartlang.org/dropdown_search-0.4.6/lib/dropdown_search.dart:248:7: Error: No named parameter with the name 'autovalidateMode'.
autovalidateMode: widget.autoValidateMode,
^^^^^^^^^^^^^^^^
/D:/flutter/packages/flutter/lib/src/widgets/form.dart:282:9: Context: Found this candidate, but the arguments don't match.
const FormField({
^^^^^^^^^
FAILURE: Build failed with an exception.
Where:
Script 'D:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 896
What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
Process 'command 'D:\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 26s
Exception: Gradle task assembleDebug failed with exit code 1
What is yours flutter version?
I had a similar problem and fixed upgrading flutter to 1.22.5.
Try:
flutter upgrade
Font: github issue

Exception: Gradle task assembleDebug failed with exit code 1, Flutter

Where:
Build file '/home/dhiraj/Desktop/mine/hamrokart-flutter/android/app/build.gradle' line: 55
What went wrong:
A problem occurred evaluating project ':app'.
java.net.URISyntaxException: Illegal character in opaque part at index 2: C:\Users\nibba\key.jks
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 0s
Exception: Gradle task assembleDebug failed with exit code 1
Make sure your DNS Resolver config file is writable:
Open Terminal.
Type : sudo nano /etc/resolv.conf
Change the IP address in the file to: 8.8.8.8
Press CTRL+X to save the file.
Now you run flutter.
(OR)
delete .grade folder

Error when passing an app to my Huawei - Android-studio - Flutter

hello I’m trying to pass by my first made an application(flutter) to my phone(Huawei) but gives me a strange error someone has already gone through the same, can anyone help me? Thank you very much!
ERROR:
Launching lib/main.dart on ALE L21 in debug mode...
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugGoogleServices'.
> File google-services.json is missing. The Google Services Plugin cannot function without it.
Searched Location:
/Users/indumonta/AndroidStudioProjects/smarthouse/android/app/src/nullnull/google-services.json
/Users/indumonta/AndroidStudioProjects/smarthouse/android/app/src/debug/google-services.json
/Users/indumonta/AndroidStudioProjects/smarthouse/android/app/src/nullnullDebug/google-services.json
/Users/indumonta/AndroidStudioProjects/smarthouse/android/app/src/nullnull/debug/google-services.json
/Users/indumonta/AndroidStudioProjects/smarthouse/android/app/src/debug/nullnull/google-services.json
/Users/indumonta/AndroidStudioProjects/smarthouse/android/app/google-services.json
* 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 9s
Exception: Gradle task assembleDebug failed with exit code 1

Resources