clojure-android

alexyakushev 2015-07-18T06:41:30.000009Z

malabarba: yes, I use it like that quite often

alexyakushev 2015-07-18T07:45:28.000010Z

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

alexyakushev 2015-07-18T07:46:24.000011Z

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

malabarba 2015-07-18T10:15:14.000012Z

Trying it out now

alexyakushev 2015-07-18T10:17:05.000013Z

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

malabarba 2015-07-18T10:17:36.000014Z

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

malabarba 2015-07-18T10:18:20.000015Z

Seems to be working. :)

alexyakushev 2015-07-18T10:18:43.000016Z

Were the slow repl commands your problem?

malabarba 2015-07-18T10:21:03.000017Z

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

malabarba 2015-07-18T10:21:19.000018Z

I just thought of asking about it last night

malabarba 2015-07-18T10:22:59.000019Z

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

alexyakushev 2015-07-18T10:24:39.000020Z

Sounds good

malabarba 2015-07-18T11:17:08.000021Z

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

malabarba 2015-07-18T11:17:13.000022Z

It does not happen on the sample project

malabarba 2015-07-18T11:17:37.000023Z

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

alexyakushev 2015-07-18T11:17:47.000024Z

You are using a support library, right?

malabarba 2015-07-18T11:17:51.000025Z

yes

malabarba 2015-07-18T11:17:55.000026Z

via dependencies

alexyakushev 2015-07-18T11:18:07.000027Z

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

alexyakushev 2015-07-18T11:19:07.000029Z

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

malabarba 2015-07-18T11:20:00.000030Z

The regular version builds fine

malabarba 2015-07-18T11:21:24.000031Z

But this is a nastily complicated project

alexyakushev 2015-07-18T11:22:31.000032Z

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

alexyakushev 2015-07-18T11:22:42.000033Z

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

alexyakushev 2015-07-18T11:23:23.000034Z

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

malabarba 2015-07-18T11:28:20.000035Z

Going home now, then I'll start on that

malabarba 2015-07-18T11:28:25.000036Z

Thanks for the tip

alexyakushev 2015-07-18T11:42:52.000037Z

No problem

malabarba 2015-07-18T12:23:31.000038Z

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

malabarba 2015-07-18T12:24:28.000039Z

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

alexyakushev 2015-07-18T12:24:34.000040Z

Eeh... nobody knows

alexyakushev 2015-07-18T12:24:45.000041Z

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

alexyakushev 2015-07-18T12:24:55.000042Z

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

malabarba 2015-07-18T12:25:04.000043Z

Hehe

malabarba 2015-07-18T12:25:23.000044Z

I'll try downgrading to 21

malabarba 2015-07-18T12:49:34.000045Z

Yay, found the issue.

malabarba 2015-07-18T12:49:43.000046Z

It's indeed the support libray

malabarba 2015-07-18T12:50:01.000047Z

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

malabarba 2015-07-18T12:50:14.000048Z

It's odd that it only happens with skummet though

malabarba 2015-07-18T12:51:20.000049Z

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

malabarba 2015-07-18T12:51:27.000050Z

`

malabarba 2015-07-18T12:51:38.000051Z

: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"]]

alexyakushev 2015-07-18T12:57:16.000052Z

Looks fine. What's in the second dependency?

malabarba 2015-07-18T12:59:26.000053Z

It's the dep that's causing the problem

alexyakushev 2015-07-18T13:01:55.000054Z

I know what's going on

alexyakushev 2015-07-18T13:02:08.000055Z

This dep probably pulls a support library dependency

alexyakushev 2015-07-18T13:02:26.000056Z

And then lein-droid adds an explicit support library dependency

alexyakushev 2015-07-18T13:03:57.000057Z

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

malabarba 2015-07-18T14:04:22.000058Z

That makes sense. Thanks for the help Alex.

malabarba 2015-07-18T14:05:07.000059Z

Sorry for vanishing like this, something came up here

malabarba 2015-07-18T14:06:23.000060Z

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.

alexyakushev 2015-07-18T14:07:19.000061Z

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

alexyakushev 2015-07-18T14:07:29.000062Z

This sucks

alexyakushev 2015-07-18T14:07:54.000063Z

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

malabarba 2015-07-18T14:11:40.000064Z

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

alexyakushev 2015-07-18T14:12:08.000065Z

I suppose so

alexyakushev 2015-07-18T14:12:27.000066Z

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

malabarba 2015-07-18T15:22:36.000067Z

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

alexyakushev 2015-07-18T15:33:59.000068Z

Good to know