Flutter build failed for android

#1

The flutter build of my app fails with the following error.

Task ‘assembleStatingDebug’ not found in root project ‘android’. Some candidates are: ‘assembleStagingDebug’.

Do you know anything about this?

+------------------------------------------------------------------------------+

| (10) flutter-build@0                                                         |
+------------------------------------------------------------------------------+
| id: flutter-build                                                            |
| version: 0.13.2                                                              |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: go                                                                  |
| time: 2021-02-04T07:03:36Z                                                   |
+------------------------------------------------------------------------------+
|                                                                              |
Config:
- IOSAdditionalParams: --release --no-codesign
- AndroidAdditionalParams: --debug --flavor stating --dart-define=flavor=stating --target lib/main.dart
- Platform: android
- IOSExportPattern: *build/ios/iphoneos/*.app
- AndroidOutputType: apk
- AndroidExportPattern: *build/app/outputs/apk/*/*.apk
*build/app/outputs/bundle/*/*.aab
- IOSCodesignIdentity: 
- ProjectLocation: /bitrise/src
- DebugMode: true
- CacheLevel: all
- AndroidBundleExportPattern: *build/app/outputs/bundle/*/*.aab
Build Android
$ flutter "build" "apk" "--debug" "--flavor" "stating" "--dart-define=flavor=stating" "--target" "lib/main.dart"
  ╔════════════════════════════════════════════════════════════════════════════╗
  ║                 Welcome to Flutter! - https://flutter.dev                  ║
  ║                                                                            ║
  ║ The Flutter tool uses Google Analytics to anonymously report feature usage ║
  ║ statistics and basic crash reports. This data is used to help improve      ║
  ║ Flutter tools over time.                                                   ║
  ║                                                                            ║
  ║ Flutter tool analytics are not sent on the very first run. To disable      ║
  ║ reporting, type 'flutter config --no-analytics'. To display the current    ║
  ║ setting, type 'flutter config'. If you opt out of analytics, an opt-out    ║
  ║ event will be sent, and then no further information will be sent by the    ║
  ║ Flutter tool.                                                              ║
  ║                                                                            ║
  ║ By downloading the Flutter SDK, you agree to the Google Terms of Service.  ║
  ║ Note: The Google Privacy Policy describes how data is handled in this      ║
  ║ service.                                                                   ║
  ║                                                                            ║
  ║ Moreover, Flutter includes the Dart SDK, which may send usage metrics and  ║
  ║ crash reports to Google.                                                   ║
  ║                                                                            ║
  ║ Read about data we send with crash reports:                                ║
  ║ https://flutter.dev/docs/reference/crash-reporting                         ║
  ║                                                                            ║
  ║ See Google's privacy policy:                                               ║
  ║ https://policies.google.com/privacy                                        ║
  ╚════════════════════════════════════════════════════════════════════════════╝
Downloading android-arm-profile/linux-x64 tools...                 661ms
Downloading android-arm-release/linux-x64 tools...                 306ms
Downloading android-arm64-profile/linux-x64 tools...               270ms
Downloading android-arm64-release/linux-x64 tools...               196ms
Downloading android-x64-profile/linux-x64 tools...                 190ms
Downloading android-x64-release/linux-x64 tools...                 159ms
Building without sound null safety
For more information see https://dart.dev/null-safety/unsound-null-safety
Running Gradle task 'assembleStatingDebug'...                   
FAILURE: Build failed with an exception.
* What went wrong:
Task 'assembleStatingDebug' not found in root project 'android'. Some candidates are: 'assembleStagingDebug'.
* Try:
Run gradlew tasks to get a list of available tasks. 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 50s
Running Gradle task 'assembleStatingDebug'...                      51.1s
[!]  Gradle project does not define a task suitable for the requested build.
The android/app/build.gradle file defines product flavors: develop, production, staging You must specify a --flavor option to select one of them.
Gradle task assembleStatingDebug failed with exit code 1
Failed to build Android platform, error: exit status 1
|                                                                              |
+---+---------------------------------------------------------------+----------+
| x | flutter-build@0 (exit code: 1)                                | 1.1 min  |
+---+---------------------------------------------------------------+----------+
| Issue tracker: ...thub.com/bitrise-steplib/bitrise-step-flutter-build/issues |
| Source: https://github.com/bitrise-steplib/bitrise-step-flutter-build        |
+---+---------------------------------------------------------------+----------+

0 Likes

#2

possible typo (staging not stating)

0 Likes

#3

Hello,

Thanks for reaching out! Are you still experiencing the issue described in the thread?

If yes, please provide the build URL and enable support access. To enable support access, go to the “Settings” tab for the app. Scroll down to “Enable Bitrise Support User for this app” and toggle the switch located on the right to the on position.

Support access allows us access to information for the app, including your workflows, build logs, and app settings. This allows us to address issues more efficiently, providing quicker resolution. For more information on support access, please see:

0 Likes

closed #4

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

0 Likes