![](/img/trans.png)
[英]Error getting autocomplete prediction API call: com.google.android.gms.common.api.ApiException: 9003: PLACES_API_ACCESS_NOT_CONFIGURED
[英]Google Awareness API Places with com.google.android.gms.common.api.ApiException: 7508
我幾天以來都未能成功解決我的Google Awareness Api Exception問題。
我確實實現了一個“意識快照客戶端”,以解決我的上下文收集應用程序附近的當前POI。 但不幸的是,我總是收到異常“ com.google.android.gms.common.api.ApiException:7508”,沒有任何結果。 我還實現了一個SnapshotClient來接收當前的天氣狀況,並且效果很好。 幾乎是相同的代碼,但是Weather的代碼可以正常工作,而Places的代碼則不能工作。
我現在正在網上瀏覽幾天以解決此問題,但沒有有關該特定異常代碼的信息,並且在官方android文檔中也未進行處理。
請幫幫我!!
我的代碼是:
public String measure() {
if(checkPermission() && resultWasFetched){
resultWasFetched = false;
Awareness.getSnapshotClient(this.context).getPlaces()
.addOnSuccessListener(new OnSuccessListener<PlacesResponse>() {
@Override
public void onSuccess(PlacesResponse placesResponse) {
placeLikelihoods = placesResponse.getPlaceLikelihoods();
resultWasFetched = true;
Log.i(TAG, "detected: "+ placeLikelihoods);
}
}).addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception e) {
Log.e(TAG, "Could not detect places: " + e);
}
});
}
我是stackoverflow的新手,所以很抱歉,如果缺少任何東西或其他任何問題!
檢查以確保您具有Google Maps的API密鑰。 您可以獲取api密鑰並通過Google API管理器啟用。 沒有它,您將不會通過身份驗證來訪問地圖。 您可能會想到,地點在Google地圖的背面。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.