PS D:\Development\ULTIMAT POS\App POS Backup\UltimatePOS_Flutter_1.7.1\pos> flutter run
Launching lib\main.dart on M2102J20SG in debug mode...
FAILURE: Build failed with an exception.
Where:
Build file 'D:\Development\ULTIMAT POS\App POS Backup\UltimatePOS_Flutter_1.7.1\pos\android\app\build.gradle' line: 50
What went wrong:
A problem occurred evaluating project ':app'.
Could not get unknown property 'minSdkVersion20' for extension 'flutter' of type FlutterExtension.
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 3s
Running Gradle task 'assembleDebug'... 4.6s
Exception: Gradle task assembleDebug failed with exit code 1
Go to your App level build.gradle file in android folder and then change
minSdkVersion 20
to
minSdkVersion flutter.minSdkVersion
Hope it will solve your error
try change minSdkVersion20 -> minSdkVersion 21 (add space before version)
Related
Launching lib\main.dart on sdk gphone x86 in debug mode...
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
Where:
Build file 'C:\Users\LENOVO\Videos\mine\untitled\android\build.gradle' line: 26
What went wrong:
A problem occurred evaluating root project 'android'.
A problem occurred configuring project ':app'.
Could not open proj generic class cache for build file 'C:\Users\LENOVO\Videos\mine\untitled\android\app\build.gradle' (C:\Users\LENOVO.gradle\caches\7.5\scripts\7pezi9yrwlo20hxg93al5b3wr).
> BUG! exception in phase 'semantic analysis' in source unit 'BuildScript' Unsupported class file major version 63
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 4s
Exception: Gradle task assembleDebug failed with exit code 1
please help im really hit.
One or more plugins require a higher Android SDK version.
Fix this issue by adding the following to D:\Flutter Projets\scheduler\android\app\build.gradle:
android {
compileSdkVersion 33
...
}
2
FAILURE: Build failed with an exception.
Where:
Script 'C:\Users\lijoj\Documents\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1156
What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
Process 'command 'C:\Users\lijoj\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 7s
Exception: Gradle task assembleDebug failed with exit code 1
Go into the Android -> App -> build.gradle and set targetSdkVersion and compileSdkVersion to 33
Because You have used many plugins in your project and one of them is latest plugin, so latest plugin requires latest Android sdk platfrom.
In your IDE open folder android/app/build.gradle and search for compileSdkVersion(usually inside android attribute) and in from of that replace 'flutter.compileSdkVersion' with '33'.
Hi everyone when I try to run my flutter app on web or windows its work fine But on android I have this error , Even if I create a new project ,So any on can help me please .
Error :
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:desugarDebugFileDependencies'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.DexFileDependenciesTask$DexFileDependenciesWorkerAction
> zip END header not found
* 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 33s
Exception: Gradle task assembleDebug failed with exit code 1
Add multiDexEnabled in your app/build.gradle
like this
defaultConfig {
...
multiDexEnabled true }
Issue after flutter upgrade Updated ndk but not working working fine for flutter web but on andorid showing
FAILURE: Build failed with an exception.
Where:
Build file 'D:\flutter practice\Instagramclone\android\app\build.gradle' line: 31
What went wrong:
A problem occurred evaluating project ':app'.
Could not get unknown property 'ndkVersion' for extension 'flutter' of type FlutterExtension.
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 13s
Exception: Gradle task assembleDebug failed with exit code 1
For now, writing like this works fine.
android/app/build.gradle ndkVersion "23.1.7779620"
https://developer.android.com/ndk/downloads
When I tried to run a flutter project it shows
BUILD FAILED WITH EXCEPTION
user1#user MINGW64 /c/src/projects/app
$ flutter run
Launching lib\main.dart on Samsung Galaxy S3 in debug mode...
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
Where:
Build file 'C:\src\projects\app\android\build.gradle' line: 8
What went wrong:
A problem occurred evaluating root project 'android'.
Could not create service of type ComponentMetadataSupplierRuleExecutor using DependencyManagementBuildScopeServices.createComponentMetadataSupplierRuleExecutor().
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 55s
Running Gradle task 'assembleDebug'... 77.7s
Gradle task assembleDebug failed with exit code 1
Can anyone tell why this happens, and how I can fix it, please?