flutter / samples

A collection of Flutter examples and demos
https://flutter.github.io/samples/
Other
17.35k stars 7.54k forks source link

Build failed with an exception. #2470

Open admsasha opened 1 month ago

admsasha commented 1 month ago

I'm trying to build samples/add_to_app/android_view

FAILURE: Build failed with an exception.

  • What went wrong: A problem was found with the configuration of task ':flutter:mergeDebugAndroidTestAssets' (type 'MergeSourceSetFolders').

    • Gradle detected a problem with the following location: '/home/sasha/AndroidStudioProjects/test/flutter/flutter_samples/add_to_app/android_view/flutter_module_using_plugin/.android/Flutter/build/intermediates/library_assets/debug/packageDebugAssets/out'.

    Reason: Task ':flutter:mergeDebugAndroidTestAssets' uses this output of task ':flutter:copyFlutterAssetsDebug' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.

    Possible solutions:

    1. Declare task ':flutter:copyFlutterAssetsDebug' as an input of ':flutter:mergeDebugAndroidTestAssets'.
    2. Declare an explicit dependency on ':flutter:copyFlutterAssetsDebug' from ':flutter:mergeDebugAndroidTestAssets' using Task#dependsOn.
    3. Declare an explicit dependency on ':flutter:copyFlutterAssetsDebug' from ':flutter:mergeDebugAndroidTestAssets' using Task#mustRunAfter.

how and where to fix it?

domesticmouse commented 1 month ago

PTAL @ericwindmill