HarmonyOS鸿蒙Next中默认的Empty Ability with CloudDev运行报错
HarmonyOS鸿蒙Next中默认的Empty Ability with CloudDev运行报错 DevECO Studio 3.1 Beta1, 创建了一个HarmonyOS项目, Empty Ability with CloudDev, 已经在AGCGallery创建了项目和应用,为什么一运行就报错呢?
> hvigor UP-TO-DATE :entry:default@PreBuild…
> hvigor UP-TO-DATE :entry:default@MergeProfile…
> hvigor Finished :entry:default@BuildNativeWithCmake… after 199 μs 300 ns
> hvigor UP-TO-DATE :entry:default@GenerateLoaderJson…
> hvigor UP-TO-DATE :entry:default@MakePackInfo…
> hvigor UP-TO-DATE :entry:default@ProcessProfile…
> hvigor Finished :entry:default@BuildNativeWithNinja… after 226 μs 300 ns
> hvigor UP-TO-DATE :entry:default@ProcessResource…
> hvigor UP-TO-DATE :entry:default@ProcessLibs…
> hvigor UP-TO-DATE :entry:default@CompileResource…
> hvigor Finished :entry:default@CompileJS… after 5 ms 564 μs
> hvigor ERROR: Failed :entry:default@CompileArkTS…
> hvigor ERROR: Tools execution failed.
ArkTS:ERROR File: E:/Projects/HarmonyProject/MyCloud/Application/entry/node_modules/@hw-agconnect/core-ohos/src/main/ets/AGCAaidImpl.ts:19:29 Property ‘instance’ does not exist on type ‘AGCApi’.
ArkTS:ERROR File: E:/Projects/HarmonyProject/MyCloud/Application/entry/src/main/ets/services/AgcConfig.ts:12:1 9 Property ‘instance’ does not exist on type ‘AGCApi’.
ArkTS:ERROR File: E:/Projects/HarmonyProject/MyCloud/Application/entry/src/main/ets/services/Auth.ts:15:9 Type ‘AGCApi’ is missing the following properties from type ‘AGCApi’: instance, aaid, credential, auth, function
ArkTS:ERROR File: E:/Projects/HarmonyProject/MyCloud/Application/entry/src/main/ets/services/Function.ts:13:46 Property ‘function’ does not exist on type ‘AGCApi’.
COMPILE RESULT:FAIL {ERROR:4} Detail: Please check the message from tools.
> hvigor ERROR: BUILD FAILED in 4 s 537 ms
Process finished with exit code -1
更多关于HarmonyOS鸿蒙Next中默认的Empty Ability with CloudDev运行报错的实战教程也可以访问 https://www.itying.com/category-93-b0.html
修改版本号的同时需要删除 node_modules
以及 package-lock.json
,这样 npm install
更新的时候才会下载新版本。
更多关于HarmonyOS鸿蒙Next中默认的Empty Ability with CloudDev运行报错的实战系列教程也可以访问 https://www.itying.com/category-93-b0.html
删除entry模块下的这两个文件后,重新执行npm install试试!
改了后会报下面帖子的错误。
好的,我们这边再排查下哈!
朋友,问题有没有解决,我卡在这里好久了,特来咨询下
朋友,问题有没有解决,我卡在这里好久了,特来咨询下
升级到最新版本deveco,需要手动下载新版本再安装,你试试呢,
在HarmonyOS鸿蒙Next中,Empty Ability with CloudDev运行报错可能由以下原因引起:
- 环境配置问题:确保开发环境(如DevEco Studio)和SDK版本是最新的,且与项目配置匹配。
- 依赖缺失:检查
build.gradle
文件,确保所有依赖项已正确添加,尤其是与CloudDev相关的库。 - 权限问题:确认在
config.json
中已正确配置所需权限,如网络访问权限。 - 云服务配置:检查CloudDev的配置文件,确保云服务端点和密钥等配置正确。
- 日志分析:查看运行日志,定位具体错误信息,根据提示进行修复。
建议根据错误日志逐步排查,确保所有配置和依赖项正确无误。