hey24sheep / azure-flutter-tasks

Easily build and deploy with latest Flutter build tasks for Azure DevOps Pipelines Tasks
https://marketplace.visualstudio.com/items?itemName=Hey24sheep.flutter
MIT License
89 stars 22 forks source link

Flutter Build aab failed #109

Closed cplreyes closed 5 months ago

cplreyes commented 10 months ago

Hi guys! We're experiencing the following errors, can anyone help us with this?


2024-01-22T14:12:21.1879524Z ==============================================================================
2024-01-22T14:12:21.1879737Z Task         : Flutter Build Task
2024-01-22T14:12:21.1879879Z Description  : Build a Flutter application project.
2024-01-22T14:12:21.1879992Z Version      : 0.3.10
2024-01-22T14:12:21.1880084Z Author       : Hey24sheep
2024-01-22T14:12:21.1880184Z Help         : [More Information](https://github.com/hey24sheep/azure-flutter-tasks)
2024-01-22T14:12:21.1880367Z ==============================================================================
2024-01-22T14:12:21.5390857Z [command]C:\Windows\system32\cmd.exe /D /S /C "C:\hostedtoolcache\windows\Flutter\3.16.8\windows\flutter\bin\flutter.bat build appbundle"
2024-01-22T14:12:22.6312863Z 
2024-01-22T14:12:22.6341520Z   ╔════════════════════════════════════════════════════════════════════════════╗
2024-01-22T14:12:22.6342297Z   ║                 Welcome to Flutter! - https://flutter.dev                  ║
2024-01-22T14:12:22.6342779Z   ║                                                                            ║
2024-01-22T14:12:22.6343104Z   ║ The Flutter tool uses Google Analytics to anonymously report feature usage ║
2024-01-22T14:12:22.6343473Z   ║ statistics and basic crash reports. This data is used to help improve      ║
2024-01-22T14:12:22.6345412Z   ║ Flutter tools over time.                                                   ║
2024-01-22T14:12:22.6345696Z   ║                                                                            ║
2024-01-22T14:12:22.6345996Z   ║ Flutter tool analytics are not sent on the very first run. To disable      ║
2024-01-22T14:12:22.6346343Z   ║ reporting, type 'flutter config --no-analytics'. To display the current    ║
2024-01-22T14:12:22.6346701Z   ║ setting, type 'flutter config'. If you opt out of analytics, an opt-out    ║
2024-01-22T14:12:22.6347036Z   ║ event will be sent, and then no further information will be sent by the    ║
2024-01-22T14:12:22.6347358Z   ║ Flutter tool.                                                              ║
2024-01-22T14:12:22.6347606Z   ║                                                                            ║
2024-01-22T14:12:22.6347888Z   ║ By downloading the Flutter SDK, you agree to the Google Terms of Service.  ║
2024-01-22T14:12:22.6348255Z   ║ The Google Privacy Policy describes how data is handled in this service.   ║
2024-01-22T14:12:22.6348564Z   ║                                                                            ║
2024-01-22T14:12:22.6348850Z   ║ Moreover, Flutter includes the Dart SDK, which may send usage metrics and  ║
2024-01-22T14:12:22.6349168Z   ║ crash reports to Google.                                                   ║
2024-01-22T14:12:22.6349408Z   ║                                                                            ║
2024-01-22T14:12:22.6349708Z   ║ Read about data we send with crash reports:                                ║
2024-01-22T14:12:22.6350038Z   ║ https://flutter.dev/docs/reference/crash-reporting                         ║
2024-01-22T14:12:22.6350305Z   ║                                                                            ║
2024-01-22T14:12:22.6350564Z   ║ See Google's privacy policy:                                               ║
2024-01-22T14:12:22.6350862Z   ║ https://policies.google.com/privacy                                        ║
2024-01-22T14:12:22.6351110Z   ║                                                                            ║
2024-01-22T14:12:22.6351412Z   ║ To disable animations in this tool, use 'flutter config --no-animations'.  ║
2024-01-22T14:12:22.6351725Z   ╚════════════════════════════════════════════════════════════════════════════╝
2024-01-22T14:12:22.6351827Z 
2024-01-22T14:13:41.9955098Z Resolving dependencies...
2024-01-22T14:14:15.5721367Z   _fe_analyzer_shared 61.0.0 (65.0.0 available)
2024-01-22T14:14:15.5722158Z   analyzer 5.13.0 (6.3.0 available)
2024-01-22T14:14:15.5724148Z   animations 2.0.7 (2.0.11 available)
2024-01-22T14:14:15.5728717Z   archive 3.3.7 (3.4.10 available)
2024-01-22T14:14:15.5729059Z   args 2.4.0 (2.4.2 available)
2024-01-22T14:14:15.5729363Z   bloc 8.1.1 (8.1.2 available)
2024-01-22T14:14:15.5729664Z   bloc_test 9.1.1 (9.1.5 available)
2024-01-22T14:14:15.5729946Z   build 2.3.1 (2.4.1 available)
2024-01-22T14:14:15.5730301Z   built_value 8.4.4 (8.8.1 available)
2024-01-22T14:14:15.5730584Z   cli_util 0.3.5 (0.4.1 available)
2024-01-22T14:14:15.5730890Z   code_builder 4.5.0 (4.10.0 available)
2024-01-22T14:14:15.5731196Z   coverage 1.6.3 (1.7.2 available)
2024-01-22T14:14:15.5731479Z   cross_file 0.3.3+4 (0.3.3+8 available)
2024-01-22T14:14:15.5731789Z   crypto 3.0.2 (3.0.3 available)
2024-01-22T14:14:15.5732100Z   cupertino_icons 1.0.5 (1.0.6 available)
2024-01-22T14:14:15.5732414Z   currency_text_input_formatter 2.1.10 (2.1.13 available)
2024-01-22T14:14:15.5732745Z   dart_style 2.3.0 (2.3.4 available)
2024-01-22T14:14:15.5733070Z   ffi 1.2.1 (2.1.2 available)
2024-01-22T14:14:15.5733343Z   file 6.1.4 (7.0.0 available)
2024-01-22T14:14:15.5733645Z   file_picker 4.6.1 (6.1.1 available)
2024-01-22T14:14:15.5733953Z   flutter_bloc 8.1.2 (8.1.3 available)
2024-01-22T14:14:15.5734254Z   flutter_launcher_icons 0.12.0 (0.13.1 available)
2024-01-22T14:14:15.5734583Z   flutter_lints 2.0.3 (3.0.1 available)
2024-01-22T14:14:15.5735077Z   flutter_plugin_android_lifecycle 2.0.9 (2.0.17 available)
2024-01-22T14:14:15.5735420Z   flutter_pw_validator 1.5.0 (1.6.0 available)
2024-01-22T14:14:15.5735738Z   flutter_svg 2.0.5 (2.0.9 available)
2024-01-22T14:14:15.5736021Z   glob 2.1.1 (2.1.2 available)
2024-01-22T14:14:15.5736332Z   horizontal_data_table 4.1.5 (4.3.1 available)
2024-01-22T14:14:15.5736643Z   http 1.1.0 (1.2.0 available)
2024-01-22T14:14:15.5736913Z   image 4.0.17 (4.1.4 available)
2024-01-22T14:14:15.5737216Z   image_picker 0.8.7+5 (1.0.7 available)
2024-01-22T14:14:15.5737546Z   image_picker_android 0.8.6+14 (0.8.9+3 available)
2024-01-22T14:14:15.5737862Z   image_picker_for_web 2.1.12 (3.0.2 available)
2024-01-22T14:14:15.5738189Z   image_picker_ios 0.8.7+4 (0.8.9+1 available)
2024-01-22T14:14:15.5738528Z   image_picker_platform_interface 2.9.1 (2.9.3 available)
2024-01-22T14:14:15.5738841Z   image_picker_web 3.0.0+1 (3.1.1 available)
2024-01-22T14:14:15.5739147Z   intl 0.18.1 (0.19.0 available)
2024-01-22T14:14:15.5739422Z   js 0.6.7 (0.7.0 available)
2024-01-22T14:14:15.5739751Z   lint 1.10.0 (2.3.0 available)
2024-01-22T14:14:15.5740040Z   lints 2.1.1 (3.0.0 available)
2024-01-22T14:14:15.5740406Z   matcher 0.12.16 (0.12.16+1 available)
2024-01-22T14:14:15.5740759Z   material_color_utilities 0.5.0 (0.8.0 available)
2024-01-22T14:14:15.5741163Z   meta 1.10.0 (1.11.0 available)
2024-01-22T14:14:15.5741455Z   mockito 5.4.2 (5.4.4 available)
2024-01-22T14:14:15.5741780Z   mocktail 0.3.0 (1.0.3 available)
2024-01-22T14:14:15.5742077Z   open_file 3.2.1 (3.3.2 available)
2024-01-22T14:14:15.5742350Z   path 1.8.3 (1.9.0 available)
2024-01-22T14:14:15.5742654Z   path_provider 2.0.15 (2.1.2 available)
2024-01-22T14:14:15.5742954Z   path_provider_android 2.0.27 (2.2.2 available)
2024-01-22T14:14:15.5743289Z   path_provider_foundation 2.2.3 (2.3.2 available)
2024-01-22T14:14:15.5743616Z   path_provider_linux 2.1.10 (2.2.1 available)
2024-01-22T14:14:15.5743939Z   path_provider_platform_interface 2.0.6 (2.1.2 available)
2024-01-22T14:14:15.5744284Z   path_provider_windows 2.0.7 (2.2.1 available)
2024-01-22T14:14:15.5744599Z   petitparser 5.1.0 (6.0.2 available)
2024-01-22T14:14:15.5744878Z   platform 3.1.0 (3.1.4 available)
2024-01-22T14:14:15.5745224Z   plugin_platform_interface 2.1.7 (2.1.8 available)
2024-01-22T14:14:15.5745634Z   pointycastle 3.7.3 (3.7.4 available)
2024-01-22T14:14:15.5745914Z   process 4.2.4 (5.0.2 available)
2024-01-22T14:14:15.5746211Z   provider 6.0.5 (6.1.1 available)
2024-01-22T14:14:15.5746510Z   pub_semver 2.1.3 (2.1.4 available)
2024-01-22T14:14:15.5746802Z   shared_preferences 2.1.0 (2.2.2 available)
2024-01-22T14:14:15.5747744Z   shared_preferences_android 2.1.2 (2.2.1 available)
2024-01-22T14:14:15.5748067Z   shared_preferences_foundation 2.2.1 (2.3.5 available)
2024-01-22T14:14:15.5748432Z   shared_preferences_linux 2.2.0 (2.3.2 available)
2024-01-22T14:14:15.5748795Z   shared_preferences_platform_interface 2.2.0 (2.3.2 available)
2024-01-22T14:14:15.5749128Z   shared_preferences_web 2.1.0 (2.2.2 available)
2024-01-22T14:14:15.5749470Z   shared_preferences_windows 2.2.0 (2.3.2 available)
2024-01-22T14:14:15.5749788Z   shelf 1.4.0 (1.4.1 available)
2024-01-22T14:14:15.5750080Z   shelf_packages_handler 3.0.1 (3.0.2 available)
2024-01-22T14:14:15.5750398Z   shelf_static 1.1.1 (1.1.2 available)
2024-01-22T14:14:15.5750712Z   shelf_web_socket 1.0.3 (1.0.4 available)
2024-01-22T14:14:15.5750997Z   signature 5.3.2 (5.4.1 available)
2024-01-22T14:14:15.5751301Z   source_gen 1.2.7 (1.5.0 available)
2024-01-22T14:14:15.5751600Z   test 1.24.9 (1.25.1 available)
2024-01-22T14:14:15.5751875Z   test_api 0.6.1 (0.7.0 available)
2024-01-22T14:14:15.5752177Z   test_core 0.5.9 (0.6.0 available)
2024-01-22T14:14:15.5752459Z   typed_data 1.3.1 (1.3.2 available)
2024-01-22T14:14:15.5752766Z   url_launcher 6.1.10 (6.2.3 available)
2024-01-22T14:14:15.5753085Z   url_launcher_android 6.0.27 (6.2.2 available)
2024-01-22T14:14:15.5753465Z   url_launcher_ios 6.1.4 (6.2.4 available)
2024-01-22T14:14:15.5753787Z   url_launcher_linux 3.0.4 (3.1.1 available)
2024-01-22T14:14:15.5754111Z   url_launcher_macos 3.0.5 (3.1.0 available)
2024-01-22T14:14:15.5754429Z   url_launcher_platform_interface 2.1.2 (2.3.1 available)
2024-01-22T14:14:15.5754766Z   url_launcher_web 2.0.16 (2.2.3 available)
2024-01-22T14:14:15.5755088Z   url_launcher_windows 3.0.5 (3.1.1 available)
2024-01-22T14:14:15.5755388Z   vector_graphics 1.1.5 (1.1.9+2 available)
2024-01-22T14:14:15.5755714Z   vector_graphics_codec 1.1.5 (1.1.9+2 available)
2024-01-22T14:14:15.5756050Z   vector_graphics_compiler 1.1.5 (1.1.9+2 available)
2024-01-22T14:14:15.5756356Z   vm_service 9.4.0 (14.0.0 available)
2024-01-22T14:14:15.5756657Z   watcher 1.0.2 (1.1.0 available)
2024-01-22T14:14:15.5756928Z   web 0.3.0 (0.4.2 available)
2024-01-22T14:14:15.5757237Z   web_socket_channel 2.4.0 (2.4.3 available)
2024-01-22T14:14:15.5759816Z   webkit_inspection_protocol 1.2.0 (1.2.1 available)
2024-01-22T14:14:15.5760144Z   win32 2.6.1 (5.2.0 available)
2024-01-22T14:14:15.5760465Z   xdg_directories 1.0.0 (1.0.4 available)
2024-01-22T14:14:15.5760770Z   xml 6.2.2 (6.5.0 available)
2024-01-22T14:14:15.5761043Z   yaml 3.1.1 (3.1.2 available)
2024-01-22T14:14:15.5761356Z These packages are no longer being depended on:
2024-01-22T14:14:15.5761672Z - flutter_background_service 5.0.4
2024-01-22T14:14:15.5761966Z - flutter_background_service_android 6.2.1
2024-01-22T14:14:15.5762286Z - flutter_background_service_ios 5.0.0
2024-01-22T14:14:15.5762725Z - flutter_background_service_platform_interface 5.0.0
2024-01-22T14:14:15.5763021Z Changed 4 dependencies!
2024-01-22T14:14:15.5763368Z 97 packages have newer versions incompatible with dependency constraints.
2024-01-22T14:14:15.5763719Z Try `flutter pub outdated` for more information.
2024-01-22T14:14:16.8476503Z 
2024-01-22T14:17:29.0498086Z Running Gradle task 'bundleRelease'...                          
2024-01-22T14:17:29.0524435Z 
2024-01-22T14:17:29.1836681Z FAILURE: Build failed with an exception.
2024-01-22T14:17:29.1904203Z 
2024-01-22T14:17:29.1913738Z * What went wrong:
2024-01-22T14:17:29.2055882Z A problem occurred configuring root project 'android'.
2024-01-22T14:17:29.2058252Z > Could not resolve all files for configuration ':classpath'.
2024-01-22T14:17:29.2059148Z    > Could not resolve com.android.tools.build:gradle:8.0.0.
2024-01-22T14:17:29.2061018Z      Required by:
2024-01-22T14:17:29.2061371Z          project :
2024-01-22T14:17:29.2062080Z       > No matching variant of com.android.tools.build:gradle:8.0.0 was found. The consumer was configured to find a library for use during runtime, compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.0' but:
2024-01-22T14:17:29.2064186Z           - Variant 'apiElements' capability com.android.tools.build:gradle:8.0.0 declares a library, packaged as a jar, and its dependencies declared externally:
2024-01-22T14:17:29.2064970Z               - Incompatible because this component declares a component for use during compile-time, compatible with Java 11 and the consumer needed a component for use during runtime, compatible with Java 8
2024-01-22T14:17:29.2065463Z               - Other compatible attribute:
2024-01-22T14:17:29.2065910Z                   - Doesn't say anything about org.gradle.plugin.api-version (required '8.0')
2024-01-22T14:17:29.2066528Z           - Variant 'javadocElements' capability com.android.tools.build:gradle:8.0.0 declares a component for use during runtime, and its dependencies declared externally:
2024-01-22T14:17:29.2067092Z               - Incompatible because this component declares documentation and the consumer needed a library
2024-01-22T14:17:29.2067555Z               - Other compatible attributes:
2024-01-22T14:17:29.2068011Z                   - Doesn't say anything about its target Java version (required compatibility with Java 8)
2024-01-22T14:17:29.2068584Z                   - Doesn't say anything about its elements (required them packaged as a jar)
2024-01-22T14:17:29.2069068Z                   - Doesn't say anything about org.gradle.plugin.api-version (required '8.0')
2024-01-22T14:17:29.2069690Z           - Variant 'runtimeElements' capability com.android.tools.build:gradle:8.0.0 declares a library for use during runtime, packaged as a jar, and its dependencies declared externally:
2024-01-22T14:17:29.2070366Z               - Incompatible because this component declares a component, compatible with Java 11 and the consumer needed a component, compatible with Java 8
2024-01-22T14:17:29.2070804Z               - Other compatible attribute:
2024-01-22T14:17:29.2071246Z                   - Doesn't say anything about org.gradle.plugin.api-version (required '8.0')
2024-01-22T14:17:29.2071847Z           - Variant 'sourcesElements' capability com.android.tools.build:gradle:8.0.0 declares a component for use during runtime, and its dependencies declared externally:
2024-01-22T14:17:29.2072414Z               - Incompatible because this component declares documentation and the consumer needed a library
2024-01-22T14:17:29.2072856Z               - Other compatible attributes:
2024-01-22T14:17:29.2073354Z                   - Doesn't say anything about its target Java version (required compatibility with Java 8)
2024-01-22T14:17:29.2073848Z                   - Doesn't say anything about its elements (required them packaged as a jar)
2024-01-22T14:17:29.2074324Z                   - Doesn't say anything about org.gradle.plugin.api-version (required '8.0')
2024-01-22T14:17:29.2074566Z 
2024-01-22T14:17:29.2074940Z * Try:
2024-01-22T14:17:29.2075353Z > Run with --stacktrace option to get the stack trace.
2024-01-22T14:17:29.2075903Z > Run with --info or --debug option to get more log output.
2024-01-22T14:17:29.2076342Z > Run with --scan to get full insights.
2024-01-22T14:17:29.2076590Z 
2024-01-22T14:17:29.2076957Z * Get more help at https://help.gradle.org
2024-01-22T14:17:29.2077160Z 
2024-01-22T14:17:29.2077614Z BUILD FAILED in 3m 7s
2024-01-22T14:17:29.9295551Z Running Gradle task 'bundleRelease'...                            193.4s
2024-01-22T14:17:29.9361936Z Gradle task bundleRelease failed with exit code 1
2024-01-22T14:17:29.9803297Z ##[error]Error: The process 'C:\hostedtoolcache\windows\Flutter\3.16.8\windows\flutter\bin\flutter.bat' failed with exit code 1
2024-01-22T14:17:29.9841482Z ##[section]Finishing: Flutter Build aab```
aap01 commented 10 months ago

@cplreyes Hi, I would like to look into this issue and see if I can help. Do you have a reproduction strategy for this issue?

dsonar3993 commented 10 months ago

Hi @cplreyes , The error says you are using incompatible Java version. Check which one are you currently using.

hey24sheep commented 10 months ago

@cplreyes This issue is related to your Java version, it has been opened up multiple times before. Go through closed issues to check.

Check these issues for solution