PlacePicker
을 사용하여 위치 정보를 캡처하는 간단한 프로그램을 작성하려고합니다. 그러나 제 프로젝트는 필요한 수입을 해결할 수 없습니다. Google 지역 정보 PlacePicker를 Android 프로젝트에 가져올 수 없습니다.
build.gradle
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.3.0'
compile 'com.google.android.gms:play-services-location:9.2.0'
compile 'com.google.android.gms:play-services-maps:9.2.0'
}
활동 :
import com.google.android.gms.location.places.Place; // "Place" is not resolved
import com.google.android.gms.location.places.ui.PlacePicker; // "ui" is not resolved
import com.google.android.gms.maps.model.LatLng;
LatLng
가져 오기가 작동하는 것 같다,하지만 다른 두. 전체 com.google.android.gms:play-services:9.2.0
API를 가져 오면 전체 프로젝트가 올바르게 실행되지만 불필요한 라이브러리를 줄이기 위해 특정 API 호출을 사용하려고합니다.
을 답이야? 어쨌든 전체지도 패키지를 가져 오지 않습니까? –
@ cricket_007 - 내 초기 질문에 허위 설명이있는 것 같습니다. 내가 필요로하지 않는 엄청난 도서관의 초과 인 전체 Google Play 서비스 패키지 (예 :지도, 위치, 인증, 신원 확인, 피트니스 등)를 가져온 경우에만 작동한다고합니다. 나는 그 질문을 편집 할 것이다. – Fawfulcopter