Awareness.SnapshotApi.getLocation(client)
.setResultCallback(new ResultCallback<LocationResult>() {
@Override
public void onResult(@NonNull LocationResult locationResult) {
if (locationResult.getStatus().isSuccess()) {
}
}
}).addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception e) {
String error = e.getMessage();
}
com.google.android.gms.common.api.ApiException: 17: API: ContextManager.API在此设备上不可用。
当我在安卓9基本手机上运行该应用程序时,我会收到这个错误,但在安卓8三星s8上运行时也不例外。
我已经更新了最新的16.0.0意识包。
发布于 2020-04-25 17:43:47
在我的例子中,为我的项目从https://console.developers.google.com激活感知API解决了这个问题。
发布于 2022-07-13 18:06:10
在试图为感知API注册一个栅栏时也发生了同样的错误。如果您正在从AndroidStudio启动应用程序,请确保注册并使用用debug.keystore制作的API密钥。
我在mac上的debug.keystore在~/.android/debug.keystore
。
命令获取API键的SHA1:keytool -list -v -keystore debug.keystore -alias androiddebugkey -storepass android -keypass android
https://stackoverflow.com/questions/54282601
复制相似问题