HMS-Core / huawei-account-demo

Sample code for quickly integrate Huawei ID. HUAWEI Account Kit provides developers with simple, secure, and quick sign-in and authorization functions.
https://developer.huawei.com/consumer/en/hms/huawei-accountkit?ha_source=hms1
50 stars 52 forks source link

最新版本HMS安装demo之后无法体验 #6

Open onemoreflag opened 3 years ago

onemoreflag commented 3 years ago

image

Mike-mei commented 3 years ago

可以把问题描述的更详细一些吗?建议按照如下的模板提供信息

问题描述 详细描述所遇到的问题

日志 请提供一份日志

环境

其他 在此处添加有关此问题的任何其他内容

anjinok123 commented 2 years ago

我也碰到同样问题 demo 直接报错 报错内容和截图一样

日志 4:11.807 1425-1425/com.huawei.androidcodedemo V/AudioManager: querySoundEffectsEnabled... 2021-12-01 13:14:11.809 1425-1425/com.huawei.androidcodedemo E/SecurityResourcesReader: KEY is null return def directly 2021-12-01 13:14:11.810 1425-1425/com.huawei.androidcodedemo E/HMSSDK_AGCUtils: In getMetaDataAppId, Failed to read meta data for the AppID. 2021-12-01 13:14:11.810 1425-1425/com.huawei.androidcodedemo E/HMSSDK_AGCUtils: Get client/app_id failed: java.io.FileNotFoundException: agconnect-services.json 2021-12-01 13:14:11.811 1425-1425/com.huawei.androidcodedemo E/HMSSDK_AGCUtils: The client/app_id is null.

环境

Kit: [ Account] OS 版本 [ harmony 2.0] Android Studio 版本 [4.1]

anjinok123 commented 2 years ago

2021-12-01 13:38:45.065 22719-22719/com.huawei.androidcodedemo D/DecorView: showOrHideHighlightView: hasFocus=false; winMode=1; isMrgNull=true 2021-12-01 13:38:45.118 22719-22719/com.huawei.androidcodedemo I/RmeSchedManager: init Rme, version is: v1.0 2021-12-01 13:38:45.853 22719-22719/com.huawei.androidcodedemo I/RmeSchedManager: init Rme, version is: v1.0 2021-12-01 13:38:45.853 22719-22719/com.huawei.androidcodedemo I/RtgSchedEvent: current pid:22719 AppType:-1 2021-12-01 13:38:45.862 22719-22719/com.huawei.androidcodedemo D/DecorView: showOrHideHighlightView: hasFocus=true; winMode=1; isMrgNull=true 2021-12-01 13:38:45.863 22719-22719/com.huawei.androidcodedemo W/HwRemoteInputMethodManager: isCasting false because IHwDistributedWindowManager is invalid. 2021-12-01 13:38:52.031 22719-22719/com.huawei.androidcodedemo V/AudioManager: querySoundEffectsEnabled... 2021-12-01 13:38:52.036 22719-22719/com.huawei.androidcodedemo E/HMSSDK_AGCUtils: In getMetaDataAppId, Failed to read meta data for the AppID. 2021-12-01 13:38:52.037 22719-22719/com.huawei.androidcodedemo E/HMSSDK_AGCUtils: Get client/app_id failed: java.io.FileNotFoundException: agconnect-services.json 2021-12-01 13:38:52.038 22719-22719/com.huawei.androidcodedemo E/HMSSDK_AGCUtils: The client/app_id is null. 2021-12-01 13:38:52.038 22719-22719/com.huawei.androidcodedemo I/HMSSDKHMSBIInitializer: Builder->biInitFlag :true 2021-12-01 13:38:52.038 22719-22719/com.huawei.androidcodedemo I/HMSSDK[ACCOUNT]AccountAuthServiceImpl: silentSignIn 2021-12-01 13:38:52.040 22719-22719/com.huawei.androidcodedemo E/HMSSDK_AGCUtils: In getMetaDataAppId, Failed to read meta data for the AppID. 2021-12-01 13:38:52.041 22719-22719/com.huawei.androidcodedemo E/HMSSDK_AGCUtils: Get client/app_id failed: java.io.FileNotFoundException: agconnect-services.json 2021-12-01 13:38:52.041 22719-22719/com.huawei.androidcodedemo E/HMSSDK_AGCUtils: The client/app_id is null.

anjinok123 commented 2 years ago

我也碰到同样问题 demo 直接报错 报错内容和截图一样

日志 4:11.807 1425-1425/com.huawei.androidcodedemo V/AudioManager: querySoundEffectsEnabled... 2021-12-01 13:14:11.809 1425-1425/com.huawei.androidcodedemo E/SecurityResourcesReader: KEY is null return def directly 2021-12-01 13:14:11.810 1425-1425/com.huawei.androidcodedemo E/HMSSDK_AGCUtils: In getMetaDataAppId, Failed to read meta data for the AppID. 2021-12-01 13:14:11.810 1425-1425/com.huawei.androidcodedemo E/HMSSDK_AGCUtils: Get client/app_id failed: java.io.FileNotFoundException: agconnect-services.json 2021-12-01 13:14:11.811 1425-1425/com.huawei.androidcodedemo E/HMSSDK_AGCUtils: The client/app_id is null.

环境

Kit: [ Account] OS 版本 [ harmony 2.0] Android Studio 版本 [4.1]

应该是demo 缺少 agconnect-services.json 文件··········

Mike-mei commented 2 years ago

是的,需要在AppGallery Connect下载您应用的“agconnect-services.json”文件,将该文件拷贝到应用级根目录下。

anjinok123 commented 2 years ago

咨询下如果我通过scope方式 直接获取用户手机号; 首次授权的时候 会显示用户对应的手机号么?

Mike-mei commented 2 years ago

目前不开放了,手机号不会对三方提供