簡體   English   中英

Android Studio Gradle更新錯誤

[英]Android Studio gradle update error

我正在使用Android中的地理圍欄應用程序。 如果我設置

  dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        testCompile 'junit:junit:4.12'
        compile 'com.android.support:appcompat-v7:23.4.0'     
        compile 'com.google.android.gms:play-services-location:9.0.1'
    }

它工作正常。如果我將其更改為

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.4.0'  
    compile 'com.google.android.gms:play-services-location:11.0.2'
}

我收到以下錯誤。

包com.google.android.gms.maps不存在
包com.google.android.gms.maps.model不存在

為什么? 我需要將其設置為11.0.2才能與其他應用集成。

將項目與Gradle文件同步可能會有所幫助。 只需單擊“ AVD管理器”旁邊的按鈕,或在“ 工具”->“ Android”->“使用Gradle File同步項目”中導航。

嘗試將您的項目與gradle文件同步,但是如果gradle同步失敗,則下載gradle的最新版本,並在build.gradle下指定其路徑,然后嘗試再次同步。

您必須安裝缺少的 Google Play服務。 轉到設置並將您的Google Play服務和Google存儲庫更新到最新版本,即46,這意味着您必須使用此版本11.0.46

在此處輸入圖片說明

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM