登录
注册
开源
企业版
高校版
搜索
帮助中心
使用条款
关于我们
开源
企业版
高校版
私有云
模力方舟
登录
注册
9月17日,Gitee Xtreme 极智AI重磅发布,来Gitee直播间一起探索AI时代的软件研发新模式
代码拉取完成,页面将自动刷新
当前仓库属于关闭状态,部分功能使用受限,详情请查阅
仓库状态说明
捐赠
捐赠前请先登录
取消
前往登录
扫描微信二维码支付
取消
支付完成
支付提示
将跳转至支付宝完成支付
确定
取消
Watch
不关注
关注所有动态
仅关注版本发行动态
关注但不提醒动态
168
Star
1.3K
Fork
273
OpenHarmony-SIG
/
flutter_flutter
关闭
代码
Issues
423
Pull Requests
11
Wiki
统计
流水线
服务
JavaDoc
PHPDoc
质量分析
Jenkins for Gitee
腾讯云托管
腾讯云 Serverless
悬镜安全
阿里云 SAE
Codeblitz
SBOM
我知道了,不再自动展开
更新失败,请稍后重试!
移除标识
内容风险标识
本任务被
标识为内容中包含有代码安全 Bug 、隐私泄露等敏感信息,仓库外成员不可访问
Windows ohos-x64编译出错
待办的
#IBET9N
任务
itheone
创建于
2024-12-31 10:27
**【任务描述】** 再示例Demo基础上增加就会编译出错 ``` permission_handler: git: url: https://gitee.com/openharmony-sig/flutter_permission_handler.git path: permission_handler local_auth: git: url: https://gitee.com/openharmony-sig/flutter_packages.git path: packages/local_auth/local_auth shared_preferences: git: url: https://gitee.com/openharmony-sig/flutter_packages.git path: packages/shared_preferences/shared_preferences ``` 已经删除 flutter_flutter/bin/cache 目录 已经运行 flutter clean 命令 出错日志: PS D:\space\hello2> flutter build hap --target-platform ohos-x64 --release Waiting for another flutter command to release the startup lock... Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source! Downloading ohos-arm64-profile/windows-x64 tools... 971ms Downloading ohos-arm64-release/windows-x64 tools... 708ms Downloading ohos-x64-profile/windows-x64 tools... 508ms Downloading ohos-x64-release/windows-x64 tools... 723ms Downloading ohos-arm64 tools... 3.1s Downloading ohos-arm64-profile tools... 1,807ms Downloading ohos-arm64-release tools... 1,014ms Downloading ohos-x64 tools... 6.9s Downloading ohos-x64-profile tools... 969ms Downloading ohos-x64-release tools... 6.3s Downloading ohos-arm64 tools... 2,366ms Downloading ohos-arm64-profile tools... 4.6s Downloading ohos-arm64-release tools... 702ms Downloading ohos-x64 tools... 5.9s Downloading ohos-x64-profile tools... 892ms Downloading ohos-x64-release tools... 1,343ms start hap build... Unhandled exception: Crash when compiling: Null check operator used on a null value #0 new NativeTypeCfe.<anonymous closure> (package:vm/transformations/ffi/native_type_cfe.dart:62:46) #1 MappedListIterable.elementAt (dart:_internal/iterable.dart:415:31) #2 ListIterator.moveNext (dart:_internal/iterable.dart:344:26) #3 MapMixin.addEntries (dart:collection/maps.dart:177:23) #4 new Map.fromEntries (dart:core/map.dart:209:17) #5 new NativeTypeCfe (package:vm/transformations/ffi/native_type_cfe.dart:61:15) #6 new FfiTransformer (package:vm/transformations/ffi/common.dart:507:9) #7 new FfiNativeTransformer (package:vm/transformations/ffi/native.dart:70:9) #8 transformLibraries (package:vm/transformations/ffi/native.dart:39:23) #9 VmTarget.performModularTransformationsOnLibraries (package:vm/target/vm.dart:167:26) #10 KernelTarget.runBuildTransformations (package:front_end/src/fasta/kernel/kernel_target.dart:1612:19) #11 KernelTarget.buildComponent.<anonymous closure> (package:front_end/src/fasta/kernel/kernel_target.dart:640:7) <asynchronous suspension> #12 withCrashReporting (package:front_end/src/fasta/crash.dart:136:12) <asynchronous suspension> #13 _buildInternal (package:front_end/src/kernel_generator_impl.dart:206:19) <asynchronous suspension> #14 withCrashReporting (package:front_end/src/fasta/crash.dart:136:12) <asynchronous suspension> #15 kernelForProgramInternal.<anonymous closure> (package:front_end/src/api_prototype/kernel_generator.dart:62:29) <asynchronous suspension> #16 kernelForProgramInternal (package:front_end/src/api_prototype/kernel_generator.dart:61:10) <asynchronous suspension> #17 kernelForProgram (package:front_end/src/api_prototype/kernel_generator.dart:50:11) <asynchronous suspension> #18 compileToKernel (package:vm/kernel_front_end.dart:391:22) <asynchronous suspension> #19 FrontendCompiler.compile (package:frontend_server/frontend_server.dart:595:17) <asynchronous suspension> #20 starter (package:frontend_server/starter.dart:99:12) <asynchronous suspension> #21 main (file:///C:/b/s/w/ir/x/w/sdk/pkg/frontend_server/bin/frontend_server_starter.dart:13:14) <asynchronous suspension> Target kernel_snapshot failed: Exception #0 KernelSnapshot.build (package:flutter_tools/src/build_system/targets/common.dart:250:7) <asynchronous suspension> #1 _BuildInstance._invokeInternal (package:flutter_tools/src/build_system/build_system.dart:847:9) <asynchronous suspension> #2 Future.wait.<anonymous closure> (dart:async/future.dart:522:21) <asynchronous suspension> #3 _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:785:32) <asynchronous suspension> #4 Future.wait.<anonymous closure> (dart:async/future.dart:522:21) <asynchronous suspension> #5 _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:785:32) <asynchronous suspension> #6 FlutterBuildSystem.build (package:flutter_tools/src/build_system/build_system.dart:614:16) <asynchronous suspension> #7 flutterAssemble (package:flutter_tools/src/ohos/hvigor.dart:319:32) <asynchronous suspension> #8 OhosHvigorBuilder.flutterBuildPre (package:flutter_tools/src/ohos/hvigor.dart:580:9) <asynchronous suspension> #9 OhosHvigorBuilder.buildApplicationPipeLine (package:flutter_tools/src/ohos/hvigor.dart:717:5) <asynchronous suspension> #10 OhosHvigorBuilder.buildHap (package:flutter_tools/src/ohos/hvigor.dart:513:5) <asynchronous suspension> #11 BuildHapCommand.runCommand (package:flutter_tools/src/commands/build_hap.dart:80:5) <asynchronous suspension> #12 FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1257:27) <asynchronous suspension> #13 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19) <asynchronous suspension> #14 CommandRunner.runCommand (package:args/command_runner.dart:209:13) <asynchronous suspension> #15 FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:283:9) <asynchronous suspension> #16 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19) <asynchronous suspension> #18 run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:64:9) <asynchronous suspension> #19 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19) <asynchronous suspension> #20 main (package:flutter_tools/executable.dart:91:3) <asynchronous suspension> Exception: Failed to compile application for the Ohos. Running Hvigor task assembleHap... / 附上完整的pubspec.yaml: ``` name: hello2 description: A new Flutter project. # The following line prevents the package from being accidentally published to # pub.dev using `flutter pub publish`. This is preferred for private packages. publish_to: 'none' # Remove this line if you wish to publish to pub.dev # The following defines the version and build number for your application. # A version number is three numbers separated by dots, like 1.2.43 # followed by an optional build number separated by a +. # Both the version and the builder number may be overridden in flutter # build by specifying --build-name and --build-number, respectively. # In Android, build-name is used as versionName while build-number used as versionCode. # Read more about Android versioning at https://developer.android.com/studio/publish/versioning # In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. version: 1.0.0+1 environment: sdk: '>=2.19.6 <3.0.0' # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions # consider running `flutter pub upgrade --major-versions`. Alternatively, # dependencies can be manually updated by changing the version numbers below to # the latest version available on pub.dev. To see which dependencies have newer # versions available, run `flutter pub outdated`. dependencies: flutter: sdk: flutter # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.2 permission_handler: git: url: https://gitee.com/openharmony-sig/flutter_permission_handler.git path: permission_handler local_auth: git: url: https://gitee.com/openharmony-sig/flutter_packages.git path: packages/local_auth/local_auth shared_preferences: git: url: https://gitee.com/openharmony-sig/flutter_packages.git path: packages/shared_preferences/shared_preferences dev_dependencies: flutter_test: sdk: flutter # The "flutter_lints" package below contains a set of recommended lints to # encourage good coding practices. The lint set provided by the package is # activated in the `analysis_options.yaml` file located at the root of your # package. See that file for information about deactivating specific lint # rules and activating additional ones. flutter_lints: ^2.0.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec # The following section is specific to Flutter packages. flutter: # The following line ensures that the Material Icons font is # included with your application, so that you can use the icons in # the material Icons class. uses-material-design: true # To add assets to your application, add an assets section, like this: # assets: # - images/a_dot_burr.jpeg # - images/a_dot_ham.jpeg # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.dev/assets-and-images/#resolution-aware # For details regarding adding assets from package dependencies, see # https://flutter.dev/assets-and-images/#from-packages # To add custom fonts to your application, add a fonts section here, # in this "flutter" section. Each entry in this list should have a # "family" key with the font family name, and a "fonts" key with a # list giving the asset and other descriptors for the font. For # example: # fonts: # - family: Schyler # fonts: # - asset: fonts/Schyler-Regular.ttf # - asset: fonts/Schyler-Italic.ttf # style: italic # - family: Trajan Pro # fonts: # - asset: fonts/TrajanPro.ttf # - asset: fonts/TrajanPro_Bold.ttf # weight: 700 # # For details regarding fonts from package dependencies, # see https://flutter.dev/custom-fonts/#from-packages ``` **【解决方案】** **【任务来源】**
**【任务描述】** 再示例Demo基础上增加就会编译出错 ``` permission_handler: git: url: https://gitee.com/openharmony-sig/flutter_permission_handler.git path: permission_handler local_auth: git: url: https://gitee.com/openharmony-sig/flutter_packages.git path: packages/local_auth/local_auth shared_preferences: git: url: https://gitee.com/openharmony-sig/flutter_packages.git path: packages/shared_preferences/shared_preferences ``` 已经删除 flutter_flutter/bin/cache 目录 已经运行 flutter clean 命令 出错日志: PS D:\space\hello2> flutter build hap --target-platform ohos-x64 --release Waiting for another flutter command to release the startup lock... Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source! Downloading ohos-arm64-profile/windows-x64 tools... 971ms Downloading ohos-arm64-release/windows-x64 tools... 708ms Downloading ohos-x64-profile/windows-x64 tools... 508ms Downloading ohos-x64-release/windows-x64 tools... 723ms Downloading ohos-arm64 tools... 3.1s Downloading ohos-arm64-profile tools... 1,807ms Downloading ohos-arm64-release tools... 1,014ms Downloading ohos-x64 tools... 6.9s Downloading ohos-x64-profile tools... 969ms Downloading ohos-x64-release tools... 6.3s Downloading ohos-arm64 tools... 2,366ms Downloading ohos-arm64-profile tools... 4.6s Downloading ohos-arm64-release tools... 702ms Downloading ohos-x64 tools... 5.9s Downloading ohos-x64-profile tools... 892ms Downloading ohos-x64-release tools... 1,343ms start hap build... Unhandled exception: Crash when compiling: Null check operator used on a null value #0 new NativeTypeCfe.<anonymous closure> (package:vm/transformations/ffi/native_type_cfe.dart:62:46) #1 MappedListIterable.elementAt (dart:_internal/iterable.dart:415:31) #2 ListIterator.moveNext (dart:_internal/iterable.dart:344:26) #3 MapMixin.addEntries (dart:collection/maps.dart:177:23) #4 new Map.fromEntries (dart:core/map.dart:209:17) #5 new NativeTypeCfe (package:vm/transformations/ffi/native_type_cfe.dart:61:15) #6 new FfiTransformer (package:vm/transformations/ffi/common.dart:507:9) #7 new FfiNativeTransformer (package:vm/transformations/ffi/native.dart:70:9) #8 transformLibraries (package:vm/transformations/ffi/native.dart:39:23) #9 VmTarget.performModularTransformationsOnLibraries (package:vm/target/vm.dart:167:26) #10 KernelTarget.runBuildTransformations (package:front_end/src/fasta/kernel/kernel_target.dart:1612:19) #11 KernelTarget.buildComponent.<anonymous closure> (package:front_end/src/fasta/kernel/kernel_target.dart:640:7) <asynchronous suspension> #12 withCrashReporting (package:front_end/src/fasta/crash.dart:136:12) <asynchronous suspension> #13 _buildInternal (package:front_end/src/kernel_generator_impl.dart:206:19) <asynchronous suspension> #14 withCrashReporting (package:front_end/src/fasta/crash.dart:136:12) <asynchronous suspension> #15 kernelForProgramInternal.<anonymous closure> (package:front_end/src/api_prototype/kernel_generator.dart:62:29) <asynchronous suspension> #16 kernelForProgramInternal (package:front_end/src/api_prototype/kernel_generator.dart:61:10) <asynchronous suspension> #17 kernelForProgram (package:front_end/src/api_prototype/kernel_generator.dart:50:11) <asynchronous suspension> #18 compileToKernel (package:vm/kernel_front_end.dart:391:22) <asynchronous suspension> #19 FrontendCompiler.compile (package:frontend_server/frontend_server.dart:595:17) <asynchronous suspension> #20 starter (package:frontend_server/starter.dart:99:12) <asynchronous suspension> #21 main (file:///C:/b/s/w/ir/x/w/sdk/pkg/frontend_server/bin/frontend_server_starter.dart:13:14) <asynchronous suspension> Target kernel_snapshot failed: Exception #0 KernelSnapshot.build (package:flutter_tools/src/build_system/targets/common.dart:250:7) <asynchronous suspension> #1 _BuildInstance._invokeInternal (package:flutter_tools/src/build_system/build_system.dart:847:9) <asynchronous suspension> #2 Future.wait.<anonymous closure> (dart:async/future.dart:522:21) <asynchronous suspension> #3 _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:785:32) <asynchronous suspension> #4 Future.wait.<anonymous closure> (dart:async/future.dart:522:21) <asynchronous suspension> #5 _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:785:32) <asynchronous suspension> #6 FlutterBuildSystem.build (package:flutter_tools/src/build_system/build_system.dart:614:16) <asynchronous suspension> #7 flutterAssemble (package:flutter_tools/src/ohos/hvigor.dart:319:32) <asynchronous suspension> #8 OhosHvigorBuilder.flutterBuildPre (package:flutter_tools/src/ohos/hvigor.dart:580:9) <asynchronous suspension> #9 OhosHvigorBuilder.buildApplicationPipeLine (package:flutter_tools/src/ohos/hvigor.dart:717:5) <asynchronous suspension> #10 OhosHvigorBuilder.buildHap (package:flutter_tools/src/ohos/hvigor.dart:513:5) <asynchronous suspension> #11 BuildHapCommand.runCommand (package:flutter_tools/src/commands/build_hap.dart:80:5) <asynchronous suspension> #12 FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1257:27) <asynchronous suspension> #13 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19) <asynchronous suspension> #14 CommandRunner.runCommand (package:args/command_runner.dart:209:13) <asynchronous suspension> #15 FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:283:9) <asynchronous suspension> #16 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19) <asynchronous suspension> #18 run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:64:9) <asynchronous suspension> #19 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19) <asynchronous suspension> #20 main (package:flutter_tools/executable.dart:91:3) <asynchronous suspension> Exception: Failed to compile application for the Ohos. Running Hvigor task assembleHap... / 附上完整的pubspec.yaml: ``` name: hello2 description: A new Flutter project. # The following line prevents the package from being accidentally published to # pub.dev using `flutter pub publish`. This is preferred for private packages. publish_to: 'none' # Remove this line if you wish to publish to pub.dev # The following defines the version and build number for your application. # A version number is three numbers separated by dots, like 1.2.43 # followed by an optional build number separated by a +. # Both the version and the builder number may be overridden in flutter # build by specifying --build-name and --build-number, respectively. # In Android, build-name is used as versionName while build-number used as versionCode. # Read more about Android versioning at https://developer.android.com/studio/publish/versioning # In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. version: 1.0.0+1 environment: sdk: '>=2.19.6 <3.0.0' # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions # consider running `flutter pub upgrade --major-versions`. Alternatively, # dependencies can be manually updated by changing the version numbers below to # the latest version available on pub.dev. To see which dependencies have newer # versions available, run `flutter pub outdated`. dependencies: flutter: sdk: flutter # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.2 permission_handler: git: url: https://gitee.com/openharmony-sig/flutter_permission_handler.git path: permission_handler local_auth: git: url: https://gitee.com/openharmony-sig/flutter_packages.git path: packages/local_auth/local_auth shared_preferences: git: url: https://gitee.com/openharmony-sig/flutter_packages.git path: packages/shared_preferences/shared_preferences dev_dependencies: flutter_test: sdk: flutter # The "flutter_lints" package below contains a set of recommended lints to # encourage good coding practices. The lint set provided by the package is # activated in the `analysis_options.yaml` file located at the root of your # package. See that file for information about deactivating specific lint # rules and activating additional ones. flutter_lints: ^2.0.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec # The following section is specific to Flutter packages. flutter: # The following line ensures that the Material Icons font is # included with your application, so that you can use the icons in # the material Icons class. uses-material-design: true # To add assets to your application, add an assets section, like this: # assets: # - images/a_dot_burr.jpeg # - images/a_dot_ham.jpeg # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.dev/assets-and-images/#resolution-aware # For details regarding adding assets from package dependencies, see # https://flutter.dev/assets-and-images/#from-packages # To add custom fonts to your application, add a fonts section here, # in this "flutter" section. Each entry in this list should have a # "family" key with the font family name, and a "fonts" key with a # list giving the asset and other descriptors for the font. For # example: # fonts: # - family: Schyler # fonts: # - asset: fonts/Schyler-Regular.ttf # - asset: fonts/Schyler-Italic.ttf # style: italic # - family: Trajan Pro # fonts: # - asset: fonts/TrajanPro.ttf # - asset: fonts/TrajanPro_Bold.ttf # weight: 700 # # For details regarding fonts from package dependencies, # see https://flutter.dev/custom-fonts/#from-packages ``` **【解决方案】** **【任务来源】**
评论 (
5
)
登录
后才可以发表评论
状态
待办的
待办的
进行中
已完成
已拒绝
负责人
未设置
标签
未设置
项目
未立项任务
未立项任务
里程碑
未关联里程碑
未关联里程碑
Pull Requests
未关联
未关联
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
未关联
分支 (22)
标签 (7)
3.7.12-ohos-1.0.4
master
dev
3.7.12-ohos-1.0.3
br_ohos_accessibility
3.7.12-ohos-1.0.1-candidate.6
3.7.12-ohos-1.0.1-candidate.5
3.7.12-ohos-1.0.1-candidate.4
3.7.12-ohos-1.0.1-candidate.3
3.7.12-ohos-1.0.1-cadidate.2
3.7.12-ohos-1.0.1-cadidate.1
3.7.12-ohos-1.0.0
3.7.12-ohos-1.0.1
flutter-3.7.12-ohos.candidate.3
flutter-3.7.12-ohos.candidate.2
br_texture_5.0
flutter-3.7.12-ohos.candidate.1
3.22.1-ohos-0.1.0
flutter-3.7.12-ohos.candidate.0
br_optimize_har_structure
br_support_api_12
revert-merge-57-master
3.7.12-ohos-1.0.4
3.7.12-ohos-1.0.3
3.7.12-ohos-1.0.2
3.7.12-ohos-1.0.1
3.7.12-ohos-1.0.0
github.com/flutter/flutter/3.22.0
3.7.12-ohos
开始日期   -   截止日期
-
置顶选项
不置顶
置顶等级:高
置顶等级:中
置顶等级:低
优先级
不指定
严重
主要
次要
不重要
预计工期
(小时)
参与者(1)
1
https://gitee.com/openharmony-sig/flutter_flutter.git
[email protected]
:openharmony-sig/flutter_flutter.git
openharmony-sig
flutter_flutter
flutter_flutter
点此查找更多帮助
搜索帮助
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
评论
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册