Skip to content

Runing debug but the produced apk filename always app-dev-relase.apk #117954

@yodeput

Description

@yodeput

This problem only happen if I try running apk in debug mode. Thank you in advance.

image

Steps to Reproduce

  1. Execute `flutter run --flavor dev -t /lib/main_development.dart
  2. The output file at build/app/outputs/flutter-apk/app-dev-release.apk always release variant

Expected results:
Running debug apk on the device.

Actual results:
Exception: Gradle build failed to produce an .apk file. It's likely that this file was generated under /folder/folder/build, but the tool couldn't find it.

Gradle File
android {
    compileSdkVersion 33
    ndkVersion flutter.ndkVersion
    defaultConfig {
        minSdkVersion 21
        targetSdkVersion 33
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
        ndk {
            abiFilters 'x86','armeabi-v7a','arm64-v8a'
        }
        multiDexEnabled true
    }

    splits {
        abi {
            enable false
            reset()
            include 'x86','armeabi-v7a','arm64-v8a'
            universalApk  true
        }
    }


flavorDimensions "env"
    productFlavors {
        ..
        dev {
            dimension "env"
            applicationIdSuffix ""
            versionNameSuffix "-dev"
            manifestPlaceholders = [appName: "[DEV] App name"]
        }
    }

....
}
flutter doctor
[✓] Flutter (Channel stable, 3.3.10, on macOS 12.6.2 21G320 darwin-x64, locale en-US)
    • Flutter version 3.3.10 on channel stable at /Users/yogidewansyah/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 135454af32 (3 weeks ago), 2022-12-15 07:36:55 -0800
    • Engine revision 3316dd8728
    • Dart version 2.18.6
    • DevTools version 2.15.0

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Volumes/MacData/Android/sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: /Users/yogidewansyah/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/213.7172.25.2113.9123335/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 13C100
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.3)
    • Android Studio at /Users/yogidewansyah/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/213.7172.25.2113.9123335/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[✓] VS Code
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.56.0

[✓] Connected device (3 available)
    • Realme 5 Pro (mobile) • 2c2b791 • android-arm64  • Android 13 (API 33)
    • macOS (desktop)       • macos   • darwin-x64     • macOS 12.6.2 21G320 darwin-x64
    • Chrome (web)          • chrome  • web-javascript • Google Chrome 108.0.5359.124

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

image

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    r: solvedIssue is closed as solved

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions