1.创建Flutter module模版,命令行
flutter create -t module flutter_modulexxx
2.在android工程的根目录的settings.gradle中添加
include ':app'
setBinding(new Binding([gradle: this]))
evaluate(new File(
settingsDir.parentFile,
'工程全名/flutter_module/.android/include_flutter.groovy'
))
3.在app的build.gradle中添加依赖
dependencies {
implementation project(':flutter')