• Lv0
    粉丝0

积分12 / 贡献0

提问1答案被采纳0文章0

作者动态

    flutter build hap打包编译时报错:hvigor ERROR: Failed :entry:default@CompileArkTS...

    hahman 显示全部楼层 发表于 2024-3-1 11:14:48

    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'.

    有人遇到类似问题吗?不知道怎么解决了

    这里什么都没有,但你不能说这个人很懒。

    您尚未登录,无法参与评论,登录后可以:
    参与开源共建问题交流
    认同或收藏高质量问答
    获取积分成为开源共建先驱

    精彩评论1

    s_hao

    沙发 发表于 2024-3-13 20:01:16
    看报错提示是flutter_ohos中的ESObject找不到,请检查语法错误

    Copyright   ©2023  OpenHarmony开发者论坛  京ICP备2020036654号-3 |技术支持 Discuz!

    返回顶部