Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/scala/18.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在play和scala中使用Google Ads API,如何正确添加依赖项?_Scala_Dependencies_Playframework 2.0_Sbt - Fatal编程技术网

在play和scala中使用Google Ads API,如何正确添加依赖项?

在play和scala中使用Google Ads API,如何正确添加依赖项?,scala,dependencies,playframework-2.0,sbt,Scala,Dependencies,Playframework 2.0,Sbt,我正在尝试将谷歌广告api的必要依赖项添加到用scala编写的play应用程序中。 我的问题是,所有的示例都是针对java的,我无法让它在scala上运行 我一直在看这个安装指南: 我从这个站点获取了sbt的依赖项: Build.scala: val appDependencies = Seq( //won't work, sbt can't resolve the RELEASE version "com.google.api-ads" % "ads-lib" % "REL

我正在尝试将谷歌广告api的必要依赖项添加到用scala编写的play应用程序中。 我的问题是,所有的示例都是针对java的,我无法让它在scala上运行

我一直在看这个安装指南:

我从这个站点获取了sbt的依赖项:

Build.scala:

val appDependencies = Seq(
    //won't work, sbt can't resolve the RELEASE version
    "com.google.api-ads" % "ads-lib" % "RELEASE"
)

val appDependencies = Seq(
    //won't work either, see error below
    "com.google.api-ads" % "ads-lib" % "1.8.0"
)

[warn]  module not found: com.google.api-client#google-api-client;RELEASE              
[warn] ==== local: tried
[warn]   /home/rawphl/Coding/play-2.0.3/framework/../repository/local/com.google.api-     client/google-api-client/RELEASE/ivys/ivy.xml
[warn] ==== Typesafe Releases Repository: tried
[warn]   http://repo.typesafe.com/typesafe/releases/com/google/api-client/google-api-client/RELEASE/google-api-client-RELEASE.pom
[warn] ==== Typesafe Snapshots Repository: tried
[warn]   http://repo.typesafe.com/typesafe/snapshots/com/google/api-client/google-api-client/RELEASE/google-api-client-RELEASE.pom
[warn] ==== public: tried
[warn]   http://repo1.maven.org/maven2/com/google/api-client/google-api-client/RELEASE/google-api-client-RELEASE.pom
[warn]  module not found: com.google.oauth-client#google-oauth-client;RELEASE
[warn] ==== local: tried
[warn]   /home/rawphl/Coding/play-2.0.3/framework/../repository/local/com.google.oauth-client/google-oauth-client/RELEASE/ivys/ivy.xml
[warn] ==== Typesafe Releases Repository: tried
[warn]   http://repo.typesafe.com/typesafe/releases/com/google/oauth-client/google-oauth-client/RELEASE/google-oauth-client-RELEASE.pom
[warn] ==== Typesafe Snapshots Repository: tried
[warn]   http://repo.typesafe.com/typesafe/snapshots/com/google/oauth-client/google-oauth-client/RELEASE/google-oauth-client-RELEASE.pom
[warn] ==== public: tried
[warn]   http://repo1.maven.org/maven2/com/google/oauth-client/google-oauth-client/RELEASE/google-oauth-client-RELEASE.pom
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::                       
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.google.api-client#google-api-client;RELEASE: not found
[warn]  :: com.google.oauth-client#google-oauth-client;RELEASE: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::

我不知道现在该怎么办。我想我只是缺少了一些依赖项,但我不太清楚添加GoogleAPI的首选方式是什么。

使用1.9.0就可以了。更一般地说,检查依赖项、检查版本、随机化值并祈祷。

使用1.9.0就可以了。更一般地说,检查依赖项,检查版本,随机化数值并祈祷。

使用1.9.0版本就可以了。将版本更改为1.9.0确实解决了问题。@ron将您的注释转换为答案以便OP可以接受。使用1.9.0版本就可以了。将版本更改为1.9.0确实解决了问题。@ron将您的注释转换为答案以便OP可以接受它。