[英]Cant import project in Android studio(Could not find method compile() for arguments)
[英]cant find LatLng import in android studio
當我嘗試在我的代碼中使用LatLng類時,沒有可用的導入。 有誰可以請解決問題? 我已經安裝了谷歌播放服務模塊thriugh SDK經理。
它可用於
編譯'com.google.android.gms:play-services-maps:9.6.0'
您可以使用最新版本替換該版本。
LatLng位於com.google.android.gms.maps.model package
,如果您將implementation 'com.google.android.gms:play-services-maps:15.0.1'
到gradle依賴項,則可以使用該com.google.android.gms.maps.model package
。
將其包含在您的app build.gradle文件中
apply plugin: 'com.android.application'
...
dependencies {
implementation 'com.google.android.gms:play-services-maps:15.0.1'
}
有關更多信息,請訪問developers.google.com
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.