Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.7k views
in Technique[技术] by (71.8m points)

flutter引入插件后编译错误

这是一个自己的私有插件,没有发布,在pubspec.yaml通过本地路径来引入的
pubspec.yaml:

printer:
    path: ./lib/plugins/weprint/

/lib/plugins/weprint/lib/printer.dart中写了个测试方法:

class printer {
    static test(){
        print('test');
    }
}

然后在项目的main.dart引入import 'package:printer/printer.dart';做简单的调用
在as真机运行调试时报错如下:
image.png
有没有大佬知道怎么解决,或者提供一些意见或者思路


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

你用 AS 工具打开这个项目,能看到更多有帮助的信息。
flutter 里面都是简略信息 有帮助的很少


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...