When I run my flutter application on android studio this error appear, I did flutter clean and many commands but it didn't work.
Running Gradle task 'assembleDebug'...
/E:/setupfolder/programs/AndroidSDK/flutter/.pub-cache/hosted/pub.dartlang.org/pull_to_refresh-1.6.4/lib/src/smart_refresher.dart:434:9: Error: No named parameter with the name 'keyboardDismissBehavior'.
keyboardDismissBehavior:
^^^^^^^^^^^^^^^^^^^^^^^
/E:/setupfolder/programs/AndroidSDK/flutter/packages/flutter/lib/src/widgets/scroll_view.dart:588:9: Context: Found this candidate, but the arguments don't match.
const CustomScrollView({
^^^^^^^^^^^^^^^^
FAILURE: Build failed with an exception.
* Where:
Script 'E:\setupfolder\programs\AndroidSDK\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 904
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'E:\setupfolder\programs\AndroidSDK\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.
Update the version of pull_to_refresh to ^1.6.4 in pubspec.yaml
Downgrade pull_to_refresh to version 1.6.3
It is not compatible with the latest version of flutter
https://github.com/peng8350/flutter_pulltorefresh/issues/424
Related
`
../../../../../AppData/Local/flutter/.pub-cache/hosted/pub.dartlang.org/platform-3.0.0/lib/src/interface/local_platform.dart:46:19: Error: Member not found: 'packageRoot'.
io.Platform.packageRoot; // ignore: deprecated_member_use
^^^^^^^^^^^
FAILURE: Build failed with an exception.
Where:
Script 'C:\Users\HP\AppData\Local\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1159
What went wrong:
Execution failed for task ':app:compileFlutterBuildRelease'.
Process 'command 'C:\Users\HP\AppData\Local\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 19s
Running Gradle task 'assembleRelease'... 20.8s
Gradle task assembleRelease failed with exit code 1`
i cloned a swiggy ui to learn and started to build the apk from github repo and tried to build locally, just a beginner in flutter.
Read the below-mentioned article:
https://www.fluttercampus.com/guide/270/error-member-not-found-packageroot-flutter/
It might help you. The article provided four possible solutions. Try all the solutions & try your luck. If it does not work, then give me your flutter doctor summary.
FAILURE: Build failed with an exception.
Where:
Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1156
What went wrong:
Execution failed for task ':app:compileFlutterBuildRelease'.
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 1m 45s
Running Gradle task 'assembleRelease'... 107.3s
Gradle task assembleRelease failed with exit code 1
PS C:\Users\Admin\Downloads\ct\gorun\gitlab\apps\wazeto-user>
tried flutter clean, flutter pub get this didn't worked. then i went for flutter pub upgrade --major-versions ... still shows the same error after flutter build apk
that happens sometimes because some issues wrong in the flutter sdk try to download the sdk again and replase with the current. or toggle the version with the FVM tool.
it will build with you and if you use for example 2.10.0 you can use also 2.10.3 it also will work.
Building with sound null safety
Codepoint 984652 not found in font, aborting.
FAILURE: Build failed with an exception.
Where:
Script 'C:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1102
What went wrong:
Execution failed for task ':app:compileFlutterBuildRelease'.
Process 'command 'C:\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 41s
Running Gradle task 'assembleRelease'... 46.1s
Gradle task assembleRelease failed with exit code 1
try building your application with this flutter build apk --no-tree-shake-icons
There is an issue with icons in Flutter 2.10.0 which causes this error. I am assuming that you are using 2.10.0 version of Flutter.
This issue is resolved in Flutter 2.10.2. So, run Flutter upgrade in the terminal to solve the problem.
Whenever I run it it get stuck in android. This happened to me locally and I solve it doing flutter clean, which I don't know how to do in codemagic. The problem is that is nos building, heres the log.
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> java.net.URISyntaxException: Illegal character in opaque part at index 2: C:\\Users\\thech\\Downloads\\nueva_temporada-20210514T040146Z-001\\nueva_temporada\\build\\app\\intermediates\\flutter\\debug\\flutter_assets\\AssetManifest.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 30s
Running Gradle task 'assembleDebug'... 31.3s
Gradle task assembleDebug failed with exit code 1
Build failed :|
Failed to build for Android
any chance you have hardcoded path in your build.gradle or somewhere else? C:\\Users is not a valid path on Codemagic builder machines because it uses macOS or Linux
> Task :app:bundleReleaseJsAndAssets FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:bundleReleaseJsAndAssets'.
> Process 'command 'npx.cmd'' 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 33s
1 actionable task: 1 executed
It seems it's a problem with your build.gradle version at root :
1-Open Android Studio
2-Open the android folder of you project
3-android studio will upgrade the gradle version automatically (make sure it does)
4-try again to generate apk