Flutter生成的PluginRegistrant:可以找到插件的Android依赖
我编写了一个乱七八糟的插件,该插件可以使用 pickit )图书馆。该插件称为 flutter absolute path ,在插件< a href =“ https://gitlab.com/elrepo.io/flutter_absolute_path/-/blob/master/master/android/android/build.gradle#l32“ rel =“ nofollow noreferrer
dependencies {
implementation 'com.github.HBiSoft:PickiT:2.0.5'
}
”将此插件添加到我的应用程序中,然后尝试对其进行编译,我会收到此错误:
<APP_PATH>/GeneratedPluginRegistrant.java:34: error: cannot access PickiTCallbacks
flutterEngine.getPlugins().add(new net.altermundi.flutter_absolute_path.FlutterAbsolutePathPlugin());
^
class file for com.hbisoft.pickit.PickiTCallbacks not found
我发现插件正常工作的唯一方法是将库添加到我的项目上的 app/build.gradle
依赖项。
如何在不添加的情况下将插件依赖性依赖于整个项目?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
插件应该使用
api api api
而不是实现
,例如:The plugin should rather use
api
instead ofimplementation
, like so: