-
Notifications
You must be signed in to change notification settings - Fork 576
Open
Description
Issue Description:
When trying to run the example app of https://pub.dev/packages/flutter_unity_widget, I encountered the following error during the build process:
Launching lib/main.dart on sdk gphone64 arm64 in debug mode...
You are applying Flutter's app_plugin_loader Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/go/flutter-gradle-plugin-apply
You are applying Flutter's main Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/go/flutter-gradle-plugin-apply
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:mergeDebugAssets'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
> Could not resolve project :unityLibrary.
Required by:
project :app
project :app > project :flutter_unity_widget
> No matching configuration of project :unityLibrary was found. The consumer was configured to find a runtime of a component, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '7.1.2', attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' but:
- None of the consumable configurations have attributes.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 6s
Error: Gradle task assembleDebug failed with exit code 1
Exited (1).
Steps to Reproduce:
- Run the Flutter project with
flutter run
. - Observe the build process and error message.
Expected Behavior:
The project should build and run successfully without any Gradle configuration issues.
Actual Behavior:
The build fails with the error message above.
Environment:
- Flutter version: 3.22.0
- Unity version: latest
- Android Studio version: Android Studio Jellyfish | 2023.3.1
- Gradle version: 7.4.0
Additional Context:
This issue seems to be related to the deprecated method of applying Flutter's Gradle plugins. Any guidance on resolving this issue would be appreciated.
Metadata
Metadata
Assignees
Labels
No labels