DevEco Studio 启动C++调试失败10106002

DevEco Studio 启动C++调试失败10106002 我启动C++调试失败,报错

error: failed to start ability.Error Code:10106002 Error Message:The aa start command’s window option or the aa test command does not support app with release signature.Error cause: The application started by the aa command is a release signature Try the following: > The same application can be compiled with the Debug mode process to produce an application that supports Debug mode

Error while Launching ability

看起来说是要改为Debug模式,我找了一圈没找到这个Debug模式在哪里改。


5 回复

找到办法了,需要将项目级的build-profile.json5中整个signingConfigs选项删除掉就可以了。

赞,

DevEco Studio出现10106002错误通常与C++调试环境配置有关。该错误可能由NDK路径配置异常、C++工程模型加载失败或调试器连接超时导致。检查以下配置:确保SDK Manager中已安装最新C++工具链;验证build-profile.json5中的"externalNativeOptions"配置正确;确认设备开发者选项中的"调试模式"已开启。若问题持续,尝试清理工程缓存(File > Invalidate Caches)并重新同步Native依赖。

这是因为你的应用使用了发布(release)签名,而C++调试需要调试(debug)签名。解决方案:

  1. 在项目根目录找到 build-profile.json5
  2. 找到 "signingConfigs" 配置段
  3. "signature" 改为 "debug" 或确保当前使用的是调试签名
  4. 重新编译运行

如果配置中已有调试签名配置,检查当前构建变体是否为调试版本:点击Build Variants窗口,确保选择的模块为"debug"而非"release"。

调试模式下会自动使用调试签名,这样就能正常启动C++调试了。

回到顶部