缺少工件com.google.android.google-play-services:google-play-services:jar:1

时间:2015-10-17 21:27:20

标签: android eclipse maven pom.xml m2eclipse

我创建了Android Project,然后转换为Android-Maven项目。然后,我安装/下载了所需的依赖项。但是,安装/下载后,我收到此错误

  

缺少神器   com.google.android.google播放服务:谷歌播放服务:罐:1

我不知道这里出了什么问题。我发布了pom.xml以下

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
      <modelVersion>4.0.0</modelVersion>
      <groupId>HelloWorld</groupId>
      <artifactId>HelloWorld</artifactId>
      <version>0.0.1-SNAPSHOT</version>
      <build>
        <sourceDirectory>src</sourceDirectory>
        <plugins>
          <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.1</version>
            <configuration>
              <source/>
              <target/>
            </configuration>
          </plugin>
        </plugins>
      </build>
      <repositories>
        <repository>
            <id>java.net</id>
            <url>https://maven.java.net/content/repositories/public/</url>
        </repository>

        <repository>
            <id>com.google.api</id>
            <url>http://mvnrepository.com/artifact/com.google.http-client</url>
        </repository>
        </repositories>
        <dependencies>

            <dependency>
                    <groupId>.....</groupId>
                    <artifactId>.....</artifactId>
                    <version>...</version>
            </dependency>

            <dependency>
                    <groupId>.....</groupId>
                    <artifactId>.....</artifactId>
                    <version>...</version>
            </dependency>

            <dependency>
                    <groupId>com.google.api-client</groupId>
                    <artifactId>google-api-client-android</artifactId>
                    <version>1.12.0-beta</version>
            </dependency>

        </dependencies>
    </project>

我附上截图供参考。我尝试了所有与此相关的问题和答案,但没有完成。

参考屏幕截图:

enter image description here

我尝试添加以下代码和其他一些SO方式,但没有用。

<dependency>
  <groupId>com.google.android.gsm</groupId>
  <artifactId>google-play-services</artifactId>
  <version>3</version>
  <type>apklib</type>
</dependency>

0 个答案:

没有答案