XianyuTech / flutter-boot

A native-flutter-hybrid develop tool helps you add and develop flutter with your existing app
621 stars 68 forks source link

init完成后,在安卓工程同步时报错 #22

Closed longforus closed 4 years ago

longforus commented 4 years ago
* Where:
Settings file 'D:\StudioProjects\demo\EmptyT2\settings.gradle' line: 6

* What went wrong:
A problem occurred evaluating settings 'EmptyT'.
> Unable to load FastStringService

这一行代码是 : evaluate(new File('fbinclude_flutter.groovy')) 查看fbinclude_flutter.groovy文件和全局搜索,也没有找到FastStringService这个字段```

sayhixiang commented 4 years ago

能否提供android环境相关信息呢,compileSdkVersion,gradle版本,gradle plugin版本,我看本地能复现不

longforus commented 4 years ago

今天没有复现这个问题了,配置完成后,根据flutter_boost的配置,修改后也能跑起来了.具体的功能还需要进一步测试. 但是在使用中有一些问题,感觉文档略简单.新人比较迷糊.

Administrator@DESKTOP-3ES1KO9 MINGW64 /d/StudioProjects/demo/tBoot
$ ls
app/          gradle/            gradlew*     local.properties  tBoot.iml
build.gradle  gradle.properties  gradlew.bat  settings.gradle

Administrator@DESKTOP-3ES1KO9 MINGW64 /d/StudioProjects/demo/tBoot
$ flutter-boot init
info [init] init flutter module.
? 请输入flutter工程名称: (my_flutter_module) mfm
? 请输入flutter工程名称: mfm
? 请输入flutter仓库地址,回车跳过
? 请输入flutter仓库地址,回车跳过
info [create] clean flutter module git
info [create] done: no git info
info [create] creating flutter module

Creating project mfm...
  mfm\.gitignore (created)
  mfm\.idea\libraries\Dart_SDK.xml (created)
  mfm\.idea\libraries\Flutter_for_Android.xml (created)
  mfm\.idea\modules.xml (created)
  mfm\.idea\workspace.xml (created)
  mfm\.metadata (created)
  mfm\lib\main.dart (created)
  mfm\mfm.iml (created)
  mfm\mfm_android.iml (created)
  mfm\pubspec.yaml (created)
  mfm\README.md (created)
  mfm\test\widget_test.dart (created)
Running "flutter pub get" in mfm...                                 1.1s
Wrote 12 files.

All done!
Your module code is in mfm\lib\main.dart.
sill [create] flutter module recorded
info [create] flutter module created
info [ShellProject] create android softlink to D:\StudioProjects\demo\tBoot\mfm\android_shell
info [ShellProject] create ios softlink to D:\StudioProjects\demo\tBoot\mfm\ios_shell
info [create] native shell project created
sill [create] prepare gitignore
info [create] init flutter module git
info [create] done: no git info //这里会卡住很久,按回车才会继续走, 本来是没有ios工程的,也成yes了
? 是否存在iOS工程? Yes
? iOS工程本地地址,回车跳过 ()
? iOS工程本地地址,回车跳过
info [init] 跳过iOS
? 是否存在Android工程? (Y/n) y
? 是否存在Android工程? Yes
? Android工程本地地址,回车跳过 () D:\StudioProjects\demo\tBoot  //本地工程地址?是路径么?
? Android工程本地地址,回车跳过 D:\StudioProjects\demo\tBoot
sill [link] checking platform...
sill [link] linking...
info [Androidlink] init compile options
sill [Androidlink] Patch:
sill [Androidlink]     compileOptions {
sill [Androidlink]         sourceCompatibility 1.8
sill [Androidlink]         targetCompatibility 1.8
sill [Androidlink]     }
sill [Androidlink]
info [Androidlink] compile options settled into app/build.gradle
info [Androidlink] update flutter dependency
sill [Androidlink] Patch:
sill [Androidlink]     // [FLUTTER_DEPENDENCY_BEGIN]
sill [Androidlink]     if (gradle.isDetectedFlutterDir) {
sill [Androidlink]         implementation project(':flutter')
sill [Androidlink]     } else {
sill [Androidlink]         // 换成自己的远程flutter产物
sill [Androidlink]     }
sill [Androidlink]     // [FLUTTER_DEPENDENCY_END]
sill [Androidlink]
info [Androidlink] dependency settled in app/build.gradle
info [Androidlink] init gradle.properties
sill [Androidlink] Add properties:
sill [Androidlink] # [FLUTTER_CONFIG_BEGIN]
sill [Androidlink] # 自动探测flutter module源码目录功能开关,默认开
sill [Androidlink] android_enableDetectFlutterDir=true
sill [Androidlink] # [FLUTTER_CONFIG_END]
info [Androidlink] inject file: fbinclude_flutter.groovy
info [Androidlink] init gradle settings
info [Androidlink] Patch:
info [Androidlink]     // [FLUTTER_CONFIG_BEGIN]
info [Androidlink]   setBinding(new Binding([gradle: this]))
info [Androidlink]   evaluate(new File('fbinclude_flutter.groovy'))
info [Androidlink]   // [FLUTTER_CONFIG_END]
info [Androidlink] settings settled in settings.gradle
info [Androidlink] inject gitignore
info [softlink] flutterPath: D:\StudioProjects\demo\tBoot\mfm; nativePath: D:\StudioProjects\demo\tBoot
Patch:def flutterPluginVersion = 'managed'

sill [link] link process finished
sill [link] run packages get...   //这里也会卡主,要按回车才能继续

Running "flutter pub get" in mfm...                                 0.4s
info [link] link success
info [init] 混合工程初始化完成