OpenHarmony开发者论坛

标题: flutter build hap打包编译时报错:hvigor ERROR: Failed :entry:default@CompileArkTS... [打印本页]

作者: hahman    时间: 2024-3-1 11:14
标题: flutter build hap打包编译时报错:hvigor ERROR: Failed :entry:default@CompileArkTS...
[md]![97bb31c7_1522745.png](https://forums-obs.openharmony.c ... c4dtb8phvtvd8tm.png "97bb31c7_1522745.png")

```
xxx:~/demo/flutter_ohos$ flutter build hap --target-platform ohos-arm64 --local-engine-src-path=/home/xxx/work/engine/src --local-engine=ohos_release_arm64
Downloading Linux x64 Dart SDK from Flutter engine 1a65d409c7a1438a34d21b60bf30a6fd5db59314...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  238M  100  238M    0     0  23.4M      0  0:00:10  0:00:10 --:--:-- 24.6M
Building flutter tool...
Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source!
Downloading Material fonts...                                      351ms
Downloading Gradle Wrapper...                                       29ms
Downloading package sky_engine...                                  128ms
Downloading flutter_patched_sdk tools...                           232ms
Downloading flutter_patched_sdk_product tools...                   261ms
Downloading linux-x64 tools...                                   1,257ms
Downloading linux-x64/font-subset tools...                          79ms
start hap build...
ohosPluginsManager: no need to install ohos plugins
check platform environment
current platform environment PUB_HOSTED_URL = https://pub.flutter-io.cn
current platform environment FLUTTER_STORAGE_BASE_URL = https://storage.flutter-io.cn
current platform environment OHPM_HOME = /home/xxx/tools/oh-command-line-tools/ohpm
Compiling ohos_aot_bundle_release_ohos-arm64 for the Ohos...        908ms
copy flutter assets to project start
copy directory from /home/xxx/demo/flutter_ohos/build/ohos/flutter_assets to
/home/xxx/demo/flutter_ohos/ohos/entry/src/main/resources/rawfile/flutter_assets
copy flutter assets to project end
copy flutter runtime to project start
originHarFile: LocalFile:
'/home/xxx/flutter_flutter/packages/flutter_tools/templates/app_shared/ohos.tmpl/har/har_product.tmpl/flutter_embedding.har.release.10'
flutterEngineSoPath: /home/xxx/work/engine/src/out/ohos_release_arm64/libflutter.so
copy flutter runtime to project end
install completed in 0s 2ms
ohpm install success.
install completed in 0s 81ms
ohpm install success.
> hvigor Finished :entry:clean... after 16 ms
> hvigor UP-TO-DATE :entry:default@PreBuild...
> hvigor Finished :entry:default@GenerateMetadata... after 9 ms
> hvigor Finished :entry:default@CreateBuildProfile... after 2 ms
> hvigor Finished ::clean... after 1 ms
> hvigor Finished :entry:default@BuildNativeWithCmake... after 1 ms
> hvigor Finished :entry:default@GenerateLoaderJson... after 4 ms
> hvigor Finished :entry:default@MergeProfile... after 3 ms
> hvigor Finished :entry:default@BuildNativeWithNinja... after 1 ms
> hvigor Finished :entry:default@MakePackInfo... after 7 ms
> hvigor Finished :entry:default@ProcessProfile... after 67 ms
> hvigor Finished :entry:default@ProcessLibs... after 66 ms
> hvigor Finished :entry:default@ProcessResource... after 7 ms
> hvigor Finished :entry:default@DoNativeStrip... after 50 ms
> hvigor Finished :entry:default@CompileResource... after 51 ms
> hvigor Finished :entry:default@CacheNativeLibs... after 136 ms
> hvigor Finished :entry:default@BuildJS... after 2 ms
> hvigor ERROR: Failed :entry:default@CompileArkTS...


> hvigor ERROR: ArkTS Compiler Error
ERROR: ArkTS:ERROR File:
/home/xxx/demo/flutter_ohos/ohos/oh_modules/.ohpm/@ohos+flutter_ohos@file+har+flutter_embedding.har/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/FlutterEngineConnectionRegistry.ets:85:29
Cannot find name 'ESObject'.
```

有人遇到类似问题吗?不知道怎么解决了
[/md]
作者: s_hao    时间: 2024-3-13 20:01
看报错提示是flutter_ohos中的ESObject找不到,请检查语法错误




欢迎光临 OpenHarmony开发者论坛 (https://forums.openharmony.cn/) Powered by Discuz! X3.5