Flutter release模式无法运行,debug模式正常

使用flutter run --local-engine/Users/admin/Documents/WorkSpace/flutter-harmony-engine/src/out/ohos_release_arm64 运行会报错

使用flutter run --local-engine/Users/admin/Documents/WorkSpace/flutter-harmony-engine/src/out/ohos_debug_unopt_arm64 能够正常运行

具体报错:

#8      AppDomain.launch.<anonymous closure> (package:flutter_tools/src/commands/daemon.dart:649:9) 
<asynchronous suspension> 
#9      AppDomain.launch (package:flutter_tools/src/commands/daemon.dart:647:5) 
<asynchronous suspension> 
#10     RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:603:15) 
<asynchronous suspension> 
#11     FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1257:27) 
<asynchronous suspension> 
#12     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19) 
<asynchronous suspension> 
#13     CommandRunner.runCommand 
command_runner.dart:209 
  <asynchronous suspension> 
#14     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:283:9)
HarmonyOS
2024-09-14 10:22:59
浏览
收藏 0
回答 1
待解决
回答 1
按赞同
/
按时间
put_get

请检查下ohos_release_arm64/clang_arm64/gen_snapshot是否有可执行权限。

cd ohos_release_arm64/clang_arm64
ls -al gen_snapshot

如果没有可执行权限,请添加执行权限。

cd ohos_release_arm64
chmod -R +x ./*
分享
微博
QQ
微信
回复
2024-09-14 17:33:15
相关问题
Ability 全屏模式无法实现
254浏览 • 2回复 待解决
鸿蒙纯净模式无法退出
11663浏览 • 1回复 待解决
HarmonyOS 视频编码surface模式运行报错
295浏览 • 1回复 待解决
HarmonyOS ohaudio 通话模式声音无法外放
361浏览 • 1回复 待解决
HarmonyOS 怎么区分debugrelease
579浏览 • 1回复 待解决
HarmonyOS分屏幕模式和小窗口模式适配
582浏览 • 1回复 待解决
HarmonyOS EcoDev 如何配置debug/release环境
461浏览 • 1回复 待解决
如何判断当前是release包还是debug
1259浏览 • 1回复 待解决
HarmonyOS web使用隐私模式
362浏览 • 1回复 待解决