uni-app magicos获取oaid失败 使用荣耀官方sdk获取oaid自定义调试基座制作又报错
uni-app magicos获取oaid失败 使用荣耀官方sdk获取oaid自定义调试基座制作又报错
开发环境 | 版本号 | 项目创建方式 |
---|---|---|
Windows 11 专业版 | 22631.4169 | HBuilderX |
产品分类:uniapp/App
PC开发环境操作系统:Windows
PC开发环境操作系统版本号:Windows 11 专业版 版本号 23H2 安装日期 2024/4/16 操作系统版本 22631.4169 体验 Windows Feature Experience Pack 1000.22700.1034.0
HBuilderX类型:正式
HBuilderX版本号:4.24
手机系统:Android
手机系统版本号:Android 14
手机厂商:华为
手机机型:荣耀magic3
页面类型:vue
vue版本:vue2
打包方式:云端
项目创建方式:HBuilderX
操作步骤: 参考华为 荣耀官方获取oaid方法: https://developer.huawei.com/consumer/cn/doc/HMSCore-Guides/identifier-service-version-change-history-0000001050066927 https://developer.hihonor.com/cn/kitdoc?kitId=11030&navigation=guides&docId=intergrate.md
模块build中添加
api "com.huawei.hms:ads-identifier:3.4.62.300"
api 'com.hihonor.mcs:ads-identifier:1.0.2.301'
工程build中添加
maven { url 'https://developer.huawei.com/repo' }
maven { url 'https://developer.hihonor.com/repo' }
我也遇到了类似的错误, 有解决办法吗?
Caused by: org.gradle.api.GradleException: File google-services.json is missing. The Google Services Plugin cannot function without it.
Searched Location:
[PackagePath]/app/src/release/google-services.json
[PackagePath]/app/src/google-services.json
[PackagePath]/app/src/Release/google-services.json
[PackagePath]/app/google-services.json
at com.google.gms.googleservices.GoogleServicesTask.action(GoogleServicesTask.java:119)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:125)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:58)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:51)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:29)
at org.gradle.api.internal.tasks.execution.TaskExecution$3.run(TaskExecution.java:236)
at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:68)
at org.gradle.api.internal.tasks.execution.TaskExecution.executeAction(TaskExecution.java:221)
没有,官方根本不理会,不过你可以试试离线打包,就是稍微麻烦点