Fork me on GitHub
#clojure-android
<
2015-07-18
>
alexyakushev06:07:30

malabarba: yes, I use it like that quite often

alexyakushev07:07:28

malabarba: Sometimes I get troubles on bad wifi because adb tunneling is lost often

alexyakushev07:07:24

Also, if phone is not connected to USB, and when it goes to sleep-mode, REPL ops become terribly slow. But it is solved by using (neko.debug/keep-screen-on) in all activities, which is itself a useful thing to do

malabarba10:07:14

Trying it out now

alexyakushev10:07:05

malabarba: (neko.debug/keep-screen-on this) to be precise

malabarba10:07:36

Yes, I just have that in all my activities by now

malabarba10:07:20

Seems to be working. :)

alexyakushev10:07:43

Were the slow repl commands your problem?

malabarba10:07:03

My problem was that I just hadn't tried it :)

malabarba10:07:19

I just thought of asking about it last night

malabarba10:07:59

I'm gonna try to get everything running now, and then isolate that issue I was having with skummet

malabarba11:07:08

alexyakushev: https://www.refheap.com/106689 Just so you know, this is the exception I get while dexing with summet.

malabarba11:07:13

It does not happen on the sample project

malabarba11:07:37

I'll start dissecting my project now, just figured I'd show you the exception in case it was something obvious.

alexyakushev11:07:47

You are using a support library, right?

malabarba11:07:55

via dependencies

alexyakushev11:07:07

This error happens when dx is passed two sources with the same classfile

alexyakushev11:07:07

I don't know why skummet can be to blame here. So you can't build the regular version of this project alright?

malabarba11:07:00

The regular version builds fine

malabarba11:07:24

But this is a nastily complicated project

alexyakushev11:07:31

Try running with DEBUG=1 and see which jars and directories are dexed

alexyakushev11:07:42

Then try to figure out where the duplicated class might be coming from

alexyakushev11:07:23

It's a Java class, so it can't really come from skummet or its results. Must be some other clash

malabarba11:07:20

Going home now, then I'll start on that

malabarba11:07:25

Thanks for the tip

malabarba12:07:31

Is the Android build tools version supposed to match the sdk version?

malabarba12:07:28

The dexing command being used here is android-sdk/build-tools/22.0.1/dx

alexyakushev12:07:34

Eeh... nobody knows

alexyakushev12:07:45

Usually it's good to use the latest version of build-tools

alexyakushev12:07:55

Until they break something, and people stay with the previous version

malabarba12:07:23

I'll try downgrading to 21

malabarba12:07:34

Yay, found the issue.

malabarba12:07:43

It's indeed the support libray

malabarba12:07:01

Just adding the dep that uses the support library is all it takes to trigger the issue

malabarba12:07:14

It's odd that it only happens with skummet though

malabarba12:07:20

Does this look like a plausible dependency vector for the :lean profile? `

malabarba12:07:38

:dependencies ^:replace [[org.skummet/clojure "1.7.0-RC1-r2" :use-resources true]
                                        [com.jeremyfeinstein.slidingmenu/library "1.3" :extension "aar"]
                                        [neko/neko "4.0.0-alpha1"]]

alexyakushev12:07:16

Looks fine. What's in the second dependency?

malabarba12:07:26

It's the dep that's causing the problem

alexyakushev13:07:55

I know what's going on

alexyakushev13:07:08

This dep probably pulls a support library dependency

alexyakushev13:07:26

And then lein-droid adds an explicit support library dependency

alexyakushev13:07:57

This lib pulls the support library from Maven while lein-droid adds support libraries to the classpath from Android SDK dir

malabarba14:07:22

That makes sense. Thanks for the help Alex.

malabarba14:07:07

Sorry for vanishing like this, something came up here

malabarba14:07:23

I still need to figure out if I want this lib anyway. Sadly, it just looks like I don't have much of an option.

alexyakushev14:07:19

Everything stems from the fact that lein-droid magically adds dependencies from Android SDK

alexyakushev14:07:54

If one day we get AAR support, things will become much much easier

malabarba14:07:40

I could look into that. Those are just jar files with assets, no?

alexyakushev14:07:27

But then you have to somehow unpack the resources out of the archive to be able to pass it to aapt

malabarba15:07:36

Just ftr, adding com.android.support/support-v4 to the :exclusions and then using :support-libraries ["v4"] indeed solves the problem