-1

在为我的颤振应用程序构建apk时,我需要避免构建中的文件。我已经尝试通过 build.yaml 中的以下代码,但它不起作用

targets:
$default:
sources:
  exclude:
    - lib/widgets/hotel.dart
    - lib/widgets/hotel_list_view.dart
    - lib/widgets/hotel_list_data.dart
    - lib/widgets/smooth_star_rating.dart
4

1 回答 1

0

您需要在 build.gradle 中指定它

android {
    packagingOptions {
        exclude '{path}'
    }
}
于 2021-07-26T18:23:38.107 回答