Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Wearable libraries not found? #162

Open
mwm opened this issue Jun 23, 2017 · 1 comment
Open

Wearable libraries not found? #162

mwm opened this issue Jun 23, 2017 · 1 comment

Comments

@mwm
Copy link

mwm commented Jun 23, 2017

I wanted to try building a watch face in Clojure. Initially, things worked great - I built a standard Andriod app with an android wear Sdk requirement, and it installed and ran fine.

Now i need to start using wear APIs, and lein-droid doesn't seem to want to find the libraries. In particular:

I add [com.google.android.support/wearable "2.0.3" :extension "aar"] to my :dependencies , and sure enough lein droid deps finds and install that. But it the complains about:

Could not find artifact com.android.support:percent:jar:25.2.0 in android-play-services (file:///home/mwm/Android/Sdk/extras/google/m2repository)
Could not find artifact com.android.support:support-v4:jar:25.2.0 in central (https://repo1.maven.org/maven2/)
Could not find artifact com.android.support:support-v4:jar:25.2.0 in clojars (https://clojars.org/repo/)
Could not find artifact com.android.support:support-v4:jar:25.2.0 in android-support (file:///home/mwm/Android/Sdk/extras/android/m2repository)
Could not find artifact com.android.support:support-v4:jar:25.2.0 in android-play-services (file:///home/mwm/Android/Sdk/extras/google/m2repository)

This is particularly puzzling, because it looks like the next-to-last one is there:

chokfi% ls ~/Android/Sdk/extras/android/m2repository/com/android/support/support-v4/25.2.0/
support-v4-25.2.0.aar      support-v4-25.2.0.aar.sha1  support-v4-25.2.0.pom.md5
support-v4-25.2.0.aar.md5  support-v4-25.2.0.pom       support-v4-25.2.0.pom.sha1

Ok, it's an aar file, so let's make that explicit by adding [com.android.support/support-v4 "25.2.0" :extension "aar"] to my :dependencie. No change.

Have I failed to understand how package names map to entries in the maven repository? Is there some workaround I can use to get these added without using lein-droid dependencies?

@dhleong
Copy link

dhleong commented Feb 12, 2019

You've probably long since given up on this, but the problem seems to be in the dependency resolution that Leiningen itself uses; it doesn't look for aar extensions for transitive dependencies.

I was able to work around this (frustratingly) by manually excluding the transitive dependencies from their provider and explicitly adding them separately. Otherwise, leiningen will still look for the :jar dependency, even if you have separately specified it as an :aar dependency :\

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants