當我嘗試使用getToken方法時,它返回907122050錯誤代碼,這是什么意思?
try {
token = HmsInstanceId.getInstance(context).getToken(appId, defaultScope);
} catch (ApiException e) {
CoreLogger.e("getToken error: " + e.getStatusCode());
}
當我嘗試使用getToken方法時,它返回907122050錯誤代碼,這是什么意思?
try {
token = HmsInstanceId.getInstance(context).getToken(appId, defaultScope);
} catch (ApiException e) {
CoreLogger.e("getToken error: " + e.getStatusCode());
}
公眾號:1024技術圈
?? 提供互聯網知識和資訊,分享IT前沿技術,熱門資源,大廠面試題 ??
根據文件。
結果代碼
907122050
表示無法在主thread中執行該操作。該方法需要在subthread中創建。解決方案:需要創建一個thread并在新的thread中調用一個特定的方法。