我想使用 flutter_unity_widget 来嵌入我的统一项目并将其用作应用程序中的插件。
我点击了这个链接:
https://pub.dev/packages/flutter_unity_widget
但它没有编译为:
* Where:
Build file 'C:\Users\Maor\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\flutter_unity_widget-0.1.6+8\android\build.gradle' line: 39
* What went wrong:
A problem occurred evaluating project ':flutter_unity_widget'.
> Project with path ':unity-classes' could not be found in project ':flutter_unity_widget'.
而flutter_unity_widget android build.gradle中的第39行是依赖项:
implementation project(':unity-classes')
脚步:
- 我在根文件夹中添加了统一项目
我在 Unity 中打开它,设置播放器设置并将其导出到 Android。
pubspec.yaml:flutter_unity_widget:^0.1.6+5
根安卓/settings.gradle:
include ":UnityExport" project(":UnityExport").projectDir = file("./UnityExport")
根安卓/UnityExport/build.gradle:
dependencies { implementation project(':unity-classes') }
文件 -> 项目结构 -> 模块:添加 unity-classes.jar 作为模块
我正在尝试运行插件,但出现上述错误。
知道有什么问题吗?