i cant found the minSdkVersion 16 in the build.gradle - flutter

* What went wrong:
Execution failed for task ':app:dexBuilderDebug'.
> There was a failure while executing work items
> A failure occurred while executing com.android.build.gradle.internal.dexing.DexWorkAction
> Failed to process: C:\Users\El.Sa7er\AndroidStudioProjects\test_1\build\app\tmp\kotlin-classes\debug, C:\Users\El.Sa7er\AndroidStudioProjects\test_1\build\app\intermediates\javac\debug\classes
* 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 10s
┌─ Flutter Fix ──────────────────────────────────────────────────────────────┐
│ [!] The shrinker may have failed to optimize the Java bytecode. │
│ To disable the shrinker, pass the `--no-shrink` flag to this command. │
│ To learn more, see: https://developer.android.com/studio/build/shrink-code │
└────────────────────────────────────────────────────────────────────────────┘
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
this is the error
i do not found the minSdkVersion 16
in build.gradle and i dont understand what is error

In your code, In line number 42 is the minSdkVersion. Remove the line and replace it with this line. Sometimes it does not work, so clean the project and build again
minSdkVersion 21

Related

Flutter build no-shrink [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 9 days ago.
Improve this question
I am creating a mobile app and then tried to run the application in an android physical and then received this message in the terminal:
Launching lib\main.dart on vivo 1718 in debug mode...
Running Gradle task 'assembleDebug'...
ERROR:C:\Users\ADMIN\StudioProjects\dogcare_app\build\app\tmp\kotlin-classes\debug\com\example\dogcare_app\MainActivity.class: D8: Type com.example.dogcare_app.MainActivity is defined multiple times: C:\Users\ADMIN\StudioProjects\dogcare_app\build\app\tmp\kotlin-classes\debug\com\example\dogcare_app\MainActivity.class, C:\Users\ADMIN\StudioProjects\dogcare_app\build\app\intermediates\javac\debug\classes\com\example\dogcare_app\MainActivity.class
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:dexBuilderDebug'.
> There was a failure while executing work items
> A failure occurred while executing com.android.build.gradle.internal.dexing.DexWorkAction
> Failed to process: C:\Users\ADMIN\StudioProjects\dogcare_app\build\app\tmp\kotlin-classes\debug, C:\Users\ADMIN\StudioProjects\dogcare_app\build\app\intermediates\javac\debug\classes
* 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 38s
┌─ Flutter Fix ──────────────────────────────────────────────────────────────┐
│ [!] The shrinker may have failed to optimize the Java bytecode. │
│ To disable the shrinker, pass the `--no-shrink` flag to this command. │
│ To learn more, see: https://developer.android.com/studio/build/shrink-code │
└────────────────────────────────────────────────────────────────────────────┘
Exception: Gradle task assembleDebug failed with exit code 1

Problem to run the application showing some error message in Flutter

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)

Execution failed for task ':sign_in_with_apple:parseDebugLocalResources'. vscode

i tried to use the flutter stripe dependecy , then i had to upgrade gradle and kotlin i struggled a little they supposed to me to delete gradle-wrapper.jar,then it get created as damaged file, after that i am getting this error
Launching lib\main.dart on CPH2043 in debug mode...
lib\main.dart:1
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':sign_in_with_apple:parseDebugLocalResources'.
> Could not resolve all files for configuration ':sign_in_with_apple:androidApis'.
> Failed to transform android.jar to match attributes {artifactType=android-platform-attr, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
> Execution failed for PlatformAttrTransform: C:\Users\Dell\AppData\Local\Android\sdk\platforms\android-28\android.jar.
> C:\Users\Dell\AppData\Local\Android\sdk\platforms\android-28\android.jar
* 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 49s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
i tried flutter pub cache repair ,
i tried gradlew clean build ,
i desinstall and install flutter extention ,

FAILURE: Build failed with an exception. on flutter

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 }

FAILURE: Build failed with an exception. Execution failed for task ':fluttertoast:compileDebugKotlin'

FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':fluttertoast:compileDebugKotlin'.
Compilation error. See log for more details
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 21s
┌─ Flutter Fix ────────────────────────────────────────────────────────────────────────────────┐
│ [!] Your project requires a newer version of the Kotlin Gradle plugin. │
│ Find the latest version on https://kotlinlang.org/docs/gradle.html#plugin-and-versions, then │
│ update F:\Flutter Projects\clima\android\build.gradle: │
│ ext.kotlin_version = '' │
└──────────────────────────────────────────────────────────────────────────────────────────────┘
Exception: Gradle task assembleDebug failed with exit code 1
I am getting such an error when i try to build my flutter project in android studio. Please help someone.