THE JOURNAL

Flutter apk build success, build tool couldn't find it

FlutterAndroid
文章目录
  1. When compiling an Android APK in a Flutter project, it prompts that the compiled APK cannot be found.
  2. In android/build.gradle, you can see the ‘product&staging’ flavor
  3. Solution:

When compiling an Android APK in a Flutter project, it prompts that the compiled APK cannot be found.

java
Error: Gradle build failed to produce an .apk file. It's likely that this file was generated under /Users/pengyin/Downloads/program/company/hilife/hilife3inone-flutter/build, but the tool couldn't find it.

In android/build.gradle, you can see the ‘product&staging’ flavor

text
productFlavors {
    product {
        dimension "app"
        buildConfigField("boolean", "LOG_WRITE_DISABLE", "true")
        ndk {
            abiFilters 'armeabi-v7a', 'arm64-v8a'
        }
    }

    staging {
        dimension "app"
        buildConfigField("boolean", "LOG_WRITE_DISABLE", "false")
        ndk {
            abiFilters 'armeabi-v7a', 'arm64-v8a'
        }
    }

Solution:

Image text

每一个不曾起舞的日子,都是对生命的一种辜负。

继续阅读计算机