4

I'm using eclispe with adt + maven to devellop an android app (what google has successfully made difficult enough)

But eclipse doens't recognieze google's support library for android, I added it to my pom like:

    <!-- ============= ANDROID =============== -->
    <dependency>
        <groupId>com.android.support</groupId>
        <artifactId>appcompat-v7</artifactId>
        <version>27.1.1</version>
    </dependency>
    <dependency>
        <groupId>com.android.support.constraint</groupId>
        <artifactId>constraint-layout</artifactId>
        <version>1.1.0</version>
    </dependency>
    <dependency>
        <groupId>com.android.support</groupId>
        <artifactId>design</artifactId>
        <version>27.1.1</version>
    </dependency>

    <dependency>
        <groupId>com.google.android.gms</groupId>
        <artifactId>play-services-ads</artifactId>
        <version>15.0.1</version>
    </dependency>

And at this same pom I added the google repository with:

<repositories>
        <repository>
            <id>android-studio</id>
            <name>lixo</name>
            <url>https://maven.google.com</url>
            <!-- <url>file://C:\Program Files\Android\Android Studio\gradle\m2repository</url> -->
        </repository>
    </repositories>

but eclipse [and also maven through shell command] isn't able to download the jars and my maven local repository gets

enter image description here

only the source code jar came... why? how can i hadle it?

Rafael Lima
  • 3,079
  • 3
  • 41
  • 105
  • Do all the dependency tags is placed inside tag ? – NLag May 19 '18 at 01:58
  • The entries `.lastUpdated` indicate that you have some access/proxy/firewall issues or simply wrong names dependencies... – khmarbaise May 19 '18 at 10:19
  • if it was any connection related issue it wouldn't download any other dependency, or even the sources.jar, but it does... so i disagree with the possibility of access/proxy/firewall being blocking the access, unless it is at google's side – Rafael Lima May 19 '18 at 18:17

1 Answers1

0

Make sure your <dependency> elements are declared in a dependencies section, not in a <dependencyManagement> one.

And check your dependency tree, using mvn dependency:tree to validate that your expected artifact is indeed part of the dependencies needed by your project.

Only then can you check if the Google repo is taken into account or not.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250