初めて投稿します。
情報が不足しているかもしれませんがよろしくお願いします。
###前提・実現したいこと
- kotlinで作成したandroidアプリでGoogle Place APIを使って、検索を行いたい。。。
###発生している問題・エラーメッセージ
シュミレータ(Genymotion)、実機(android4.3端末)それぞれに違ったエラーが出力される
シュミレータ(Genymotion)
W/GooglePlayServicesUtil: Google Play Store is missing.
実機(android4.3端末)
W/GooglePlayServicesUtil: Google Play services out of date. Requires 9683000 but found 9452034
###該当のソースコード
- Google Api Clientのstopは省略
- ソースの公開情報の都合で必要なコードのみ記載しています。
kotlin
var googleApiClient: GoogleApiClient? = null googleApiClient = GoogleApiClient.Builder(this.context) .addApi(Places.GEO_DATA_API) .addApi(Places.PLACE_DETECTION_API) .addConnectionCallbacks(this) .addOnConnectionFailedListener(this) .build() googleApiClient?.connect() var result = Places.GeoDataApi.getAutocompletePredictions(googleApiClient, searchText.getText().toString(), LatLngBounds(LatLng(35.485901 , 138.779526), LatLng(35.486801 , 138.78064)),filter.build()) result.setResultCallback { likelyPlaces -> var places: ArrayList<LikelyPlace> = ArrayList<LikelyPlace>() for(placeLikelihood in likelyPlaces) { var place: LikelyPlace = LikelyPlace() place.name = placeLikelihood.getPrimaryText(null).toString() place.address = placeLikelihood.getSecondaryText(null).toString() Log.d("name", place.name) Log.d("address", place.address) } likelyPlaces.release() }
###試したこと
- 実機検証
- Google API Clientのconnect確認
###補足情報(言語/FW/ツール等のバージョンなど)
-
kotlinで作成したandroidアプリでGoogle Place APIを使って、検索を行いたい(text editはXMLに記載済)
-
gradleに「compile "com.google.android.gms:play-services-gcm:9.6.0"」は記載済
同様の事象に遭われた方ぜひ、知見をお借りしたいです。
よろしくお願いいたします。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。