2013-10-24 61 views
0

有沒有什麼方法可以在Scala SBT-Android項目上指定Android Play服務的依賴關係? 我需要編寫接收Google Cloud Message的應用程序。Google Play服務依賴於android scala項目

我Build.scala

試圖

libraryDependencies ++= Seq(
    "com.actionbarsherlock" % "library" % "4.0.2" artifacts(Artifact("library", "apklib", "apklib")), 
    "com.google.android.gms" % "play-services" % "3.2.65" artifacts(Artifact("play-services", "aar", "aar")) 
) 

但是,當我試圖建立APK,SBT抱怨

[warn] :::::::::::::::::::::::::::::::::::::::::::::: 
[warn] ::   UNRESOLVED DEPENDENCIES   :: 
[warn] :::::::::::::::::::::::::::::::::::::::::::::: 
[warn] :: com.google.android.gms#play-services;3.2.65: not found 
[warn] :::::::::::::::::::::::::::::::::::::::::::::: 
[trace] Stack trace suppressed: run last *:update for the full output. 
[error] (*:update) sbt.ResolveException: unresolved dependency:  com.google.android.gms#play- services;3.2.65: not found 

在此先感謝。

+0

找到的播放服務有哪些存儲庫?看起來您可能沒有配置解決方案。 – jsuereth

回答

0

如果您使用appcompat庫,您必須安裝Android SDK工具,「Google Repository」以及「Android支持庫」。

HRE是我在build.sbt設置:

libraryDependencies += aarlib("com.google.android.gms" % "play-services" % "4.+") 

順便說一句,在Android的SDK-插件似乎現在得到更好的維護。