解決引入google map android sdk時遇到的問題
Posted on 2016-12-21 00:24 leekiang 閱讀(1221) 評論(0) 編輯 收藏 所屬分類: androidrepositories{
mavenCentral()
}
dependencies {按以上配置,運行clean時報錯,無法加載play-services-maps 10.0.1包。
compile ('com.google.android.gms:play-services-maps:10.0.1')
}
Error:(69, 14) Failed to resolve: com.google.android.gms:play-services-maps:10.0.1
<a href="install.m2.repo">Install Repository and sync project</a><br><a href="openFile:/Users/you/AndroidProjects/yourapp/app/build.gradle">Show in File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>
點擊Android Studio的提示如何修復的鏈接,就會自動下載Google的相關依賴包到本地。下載時彈出窗口中顯示的一些信息如下。Install Missing Componets
SDK Path:/User/you/Library/Android/sdk
To install:
- SDK Patch Applier v4 (patcher;v4)
- Google Repository (extras;google;m2repository)
Installing SDK Patch Applier v4
Downloading https://dl.google.com/android/repository/3534162-studio.sdk-patcher.zip
Installing SDK Patch Applier v4 in /Users/you/Library/Android/sdk/patcher/v4
Installation of SDK Patch Applier v4 complete.
Installing Google Repository
Downloading https://dl.google.com/android/repository/google_m2repository_gms_v8_rc42_wear_2b1_rc4.zip
Installing Google Repository in /Users/you/Library/Android/sdk/extras/google/m2repository
Installation of Google Repository complete.
http://www.joellipman.com/articles/google/android/application-development/android-os-add-googlemap-as-fragment.html
https://www.zhihu.com/question/20892245
http://blog.csdn.net/woshilisao/article/details/8647649 android fragment(android.support.v4.app.Fragment和android.app.Fragment區別)
http://www.tuicool.com/articles/YFBv6nJ Introduction to Google Maps API for Android