skip to Main Content

E:flutter-3.3.7flutterbinflutter.bat –no-color build apk
Running Gradle task ‘assembleRelease’…
Warning: The plugin path_provider_android requires Android SDK version 33.
For more information about build configuration, see https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
Warning: The plugin permission_handler_android requires Android SDK version 33.
For more information about build configuration, see https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
Warning: The plugin shared_preferences_android requires Android SDK version 33.
For more information about build configuration, see https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
One or more plugins require a higher Android SDK version.
Fix this issue by adding the following to C:UsersGauravDesktopMyAppandroidappbuild.gradle:
android {
compileSdkVersion 33

}

Font asset "MaterialIcons-Regular.otf" was tree-shaken, reducing it from 1645184 to 2796 bytes (99.8% reduction). Tree-shaking can be disabled by providing the –no-tree-shake-icons flag when building your app.
Target android_aot_release_android-arm failed: ProcessException: Failed to find "E:flutter-3.3.7flutterbincacheartifactsengineandroid-arm-releasewindows-x64gen_snapshot" in the search path.
Command: E:flutter-3.3.7flutterbincacheartifactsengineandroid-arm-releasewindows-x64gen_snapshot
Target android_aot_release_android-arm64 failed: ProcessException: Failed to find "E:flutter-3.3.7flutterbincacheartifactsengineandroid-arm64-releasewindows-x64gen_snapshot" in the search path.
Command: E:flutter-3.3.7flutterbincacheartifactsengineandroid-arm64-releasewindows-x64gen_snapshot
Target android_aot_release_android-x64 failed: ProcessException: Failed to find "E:flutter-3.3.7flutterbincacheartifactsengineandroid-x64-releasewindows-x64gen_snapshot" in the search path.
Command: E:flutter-3.3.7flutterbincacheartifactsengineandroid-x64-releasewindows-x64gen_snapshot

FAILURE: Build failed with an exception.

  • Where:
    Script ‘E:flutter-3.3.7flutterpackagesflutter_toolsgradleflutter.gradle’ line: 1159

  • What went wrong:
    Execution failed for task ‘:app:compileFlutterBuildRelease’.

Process ‘command ‘E:flutter-3.3.7flutterbinflutter.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.

BUILD FAILED in 10s
Running Gradle task ‘assembleRelease’… 11.4s
Gradle task assembleRelease failed with exit code 1
Process finished with exit code 1

I tried the solution from how to solve Execution failed for task ':app:compileFlutterBuildDebug' but it is not working.

2

Answers


  1. Set

    targetSdkVersion 33
    compileSdkVersion 33
    
    Login or Signup to reply.
  2. It is written in the error you provided that the following packages: shared_preferences_android and permission_handler_android needs SDK version 33.

    So, Go to androidappbuild.gradle , and make the following chnages:

    compileSdkVersion: 33
    targetSdkVersion 33
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search