这是indexloc提供的服务,不要输入任何密码
Skip to content

"Set up Flutter flavors for Android" needs Update (Flutter 3.32) #12205

@crcdng

Description

@crcdng

Page URL

https://docs.flutter.dev/deployment/flavors/

Page source

https://github.com/flutter/website/tree/main/src/content/deployment/flavors.md

Describe the problem

the tutorial says about android/app/build.gradle.kts:

"Make sure that the android {} block also contains the default debug and release build types:"

[...]

buildTypes {
      getByName("debug") {...}
      getByName("release") {...}
    }

...while the actual android/app/build.gradle.kts contains (in particular, there is no "debug" section):

buildTypes {
        release {
            // TODO: Add your own signing config for the release build.
            // Signing with the debug keys for now, so `flutter run --release` works.
            signingConfig = signingConfigs.getByName("debug")
        }
    }

Expected fix

it's not clear to me if the missing debug section is a problem for the flavor system or the tutorial just needs a wording update

Additional context

Flutter 3.32.6

I would like to fix this problem.

  • I will try and fix this problem on docs.flutter.dev.

Metadata

Metadata

Assignees

No one assigned

    Labels

    from.page-issueReported in a reader-filed concern

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions