Code Monkey home page Code Monkey logo

lein-droid's People

Contributors

adamclements avatar alexander-yakushev avatar ayamada avatar nablaa avatar oakes avatar osbert avatar sergv avatar timothypratley avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lein-droid's Issues

NullPointerException when adding feedparser-clj as a dependency

Adding [org.clojars.scsibug/feedparser-clj "0.4.0"] to the dependency list in an otherwise untouched project, I get an exception when trying to compile, which points to classpath.clj:36 passing in nil to .parseVersion. The top of the stack trace is:

Compiling Clojure files...
java.lang.NullPointerException
    at org.sonatype.aether.util.version.GenericVersion$Tokenizer.<init>(GenericVersion.java:183)
    at org.sonatype.aether.util.version.GenericVersion.parse(GenericVersion.java:51)
    at org.sonatype.aether.util.version.GenericVersion.<init>(GenericVersion.java:43)
    at org.sonatype.aether.util.version.GenericVersionScheme.parseVersion(GenericVersionScheme.java:46)
    at leiningen.droid.classpath$remove_duplicate_dependencies$iter__1613__1617$fn__1618$fn__1629.invoke(classpath.clj:36)
    at clojure.lang.ArrayChunk.reduce(ArrayChunk.java:58)

This quick-n-dirty change lets it pass, but there's bound to be a root cause somewhere else.

diff --git a/src/leiningen/droid/classpath.clj b/src/leiningen/droid/classpath.clj
index a9d781b..c4073fc 100644
--- a/src/leiningen/droid/classpath.clj
+++ b/src/leiningen/droid/classpath.clj
@@ -33,8 +33,10 @@
                             same-jars))
                         same-jars)]
         (:original
-         (reduce #(if (pos? (compare (.parseVersion scheme (:version %2))
-                                     (.parseVersion scheme (:version %1))))
+         (reduce #(if (pos? (compare (.parseVersion scheme (let [v (:version %2)]
+                                                             (if (= v nil) "0" v)))
+                                     (.parseVersion scheme (let [v (:version %1)]
+                                                             (if (= v nil) "0" v)))))
                     %2 %1)
                  same-jars))))))

0.2.0-beta3: Stub app won't work

I just created a brand new app and the SplashActivity, which is written in java in the "stub" app does not seem to make it into the dex. When I try to run it I get the following:

 java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.clojure.app/com.example.clojure.app.SplashActivity}: java.lang.ClassNotFoundException: Didn't find class "com.example.clojure.app.SplashActivity" on path: /data/app/com.example.clojure.app-1.apk
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2173)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2297)
    at android.app.ActivityThread.access$700(ActivityThread.java:152)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1282)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:137)
    at android.app.ActivityThread.main(ActivityThread.java:5328)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:511)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
    at dalvik.system.NativeStart.main(Native Method)
 Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.clojure.app.SplashActivity" on path: /data/app/com.example.clojure.app-1.apk
    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:65)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
    at android.app.Instrumentation.newActivity(Instrumentation.java:1071)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2164)
    … 11 more

Searching for the class, it does seem to be compiled:

./target/classes/com/example/clojure/app/SplashActivity$1.class
./target/classes/com/example/clojure/app/SplashActivity.class

But the following command doesn't give any output:

dexdump target/classes.dex | grep Splash

Not include resources from dependencies *.jar to apk

I use lein-droid with LibGDX.
LibGDX's gdx.jar includes com/badlogic/gdx/utils/arial-15.fnt and com/badlogic/gdx/utils/arial-15.png.
But, the *.apk (generated by lein-droid) is not included these resources, and my application don't work because that cannot found these resources.

maven-android-plugin can include these resources, and I look up maven-android-plugin sources.
So, I found to do addResourcesFromJar to many related jars in doAPKWithAPKBuilder() in maven-android-plugin/src/main/java/com/jayway/maven/plugins/android/phase09package/ApkMojo.java (maybe).

Probably, resource-jars in leiningen.droid.build/create-apk may be added many related jars too.

Or, please add lein-droid's new option that can add to resource-jars.

.getText on an EditText returns empty String

I am having trouble getting the value of an EditText field in my app. I have something like this to bind ids.

(defn main-layout [] (make-ui
                   [:linear-layout {:orientation :vertical,
                                    :id-holder :true}
                     [:linear-layout {}
                       [:edit-text {:hint "name here",
                                    :id ::name}]
                       [:button {:text "+ Event",
                                 :on-click (fn [_] ( ... ))}]]
                     [:text-view {:text @listing,
                                  :id ::listing}]]))

Now when I call:

(::name (.getTag (main-layout)))

It returns an EditText as expected. However, after entering some text into the EditText field in my app then calling:

(str (.getText (::name (.getTag (main-layout)))))

it just returns "".

lein droid new fails on Windows

Using latest lein2 (2.1.3) on Win7 x64:

$ lein droid new clojuroid org.stuff.clojuroid :activity MyActivity :target-sdk 14 :app-name ClojureMeetsAndroid
Retrieving lein-droid/lein-droid/0.1.0-preview3/lein-droid-0.1.0-preview3.pom from clojars
Retrieving lein-droid/lein-droid/0.1.0-preview3/lein-droid-0.1.0-preview3.jar from clojars
java.lang.IllegalArgumentException: No implementation of method: :make-reader of
 protocol: #'clojure.java.io/IOFactory found for class: nil
        at clojure.core$_cache_protocol_fn.invoke(core_deftype.clj:541)
        at clojure.java.io$fn__8551$G__8546__8558.invoke(io.clj:73)
        at clojure.java.io$reader.doInvoke(io.clj:106)
        at clojure.lang.RestFn.invoke(RestFn.java:410)
        at leiningen.new.templates$slurp_resource.invoke(templates.clj:39)
        at leiningen.droid.new$renderer$fn__940.doInvoke(new.clj:22)
        at clojure.lang.RestFn.invoke(RestFn.java:423)
        at leiningen.droid.new$new.doInvoke(new.clj:81)
        at clojure.lang.RestFn.applyTo(RestFn.java:142)
        at clojure.core$apply.invoke(core.clj:617)
        at leiningen.droid$execute_subtask.invoke(droid.clj:85)
        at leiningen.droid$droid.doInvoke(droid.clj:74)
        at clojure.lang.RestFn.invoke(RestFn.java:816)
        at clojure.lang.Var.invoke(Var.java:455)
        at clojure.lang.AFn.applyToHelper(AFn.java:223)
        at clojure.lang.Var.applyTo(Var.java:532)
        at clojure.core$apply.invoke(core.clj:619)
        at leiningen.core.main$resolve_task$fn__1836.doInvoke(main.clj:149)
        at clojure.lang.RestFn.applyTo(RestFn.java:139)
        at clojure.lang.AFunction$1.doInvoke(AFunction.java:29)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.core$apply.invoke(core.clj:619)
        at leiningen.core.main$apply_task.invoke(main.clj:189)
        at leiningen.core.main$resolve_and_apply.invoke(main.clj:193)
        at leiningen.core.main$_main$fn__1899.invoke(main.clj:257)
        at leiningen.core.main$_main.doInvoke(main.clj:247)
        at clojure.lang.RestFn.invoke(RestFn.java:805)
        at clojure.lang.Var.invoke(Var.java:455)
        at clojure.lang.AFn.applyToHelper(AFn.java:223)
        at clojure.lang.Var.applyTo(Var.java:532)
        at clojure.core$apply.invoke(core.clj:617)
        at clojure.main$main_opt.invoke(main.clj:335)
        at clojure.main$main.doInvoke(main.clj:440)
        at clojure.lang.RestFn.invoke(RestFn.java:1096)
        at clojure.lang.Var.invoke(Var.java:465)
        at clojure.lang.AFn.applyToHelper(AFn.java:248)
        at clojure.lang.Var.applyTo(Var.java:532)
        at clojure.main.main(main.java:37)

I can't use adb logcat while my app is running

I've mentioned this in my other issues, and I've been developing without it so far, but it would be useful if I had adb logcat handy while I'm developing interactively.

lein droid forward-port causes adb logcat to exit. If I run adb logcat after lein droid forward-port it causes my nREPL to disconnect. Basically, I can't have adb logcat running while my app is also running.

0.2.0-preview1: DEX does not terminate

Using 0.2.0-preview1 lein droid doall hangs during the DEX task. I see the CPU load go up briefly and then all DEX threads hang at 0% usage.

This works fine with 0.2.0-beta3, however DEBUG=1 shows no difference in command line parameters except for the added support libs (v4 and v13) ...

Leiningen expects :aot value to be a seq

Using a keyword value for :aot in project.clj causes other leiningen functions to fail with an IllegalArgumentException.

I had been hoping to use a local repl instance in an android project to help develop code that doesn't depend on any android functionality. Is there some way I can work around this other than just commenting out that line anytime I want to start a repl?

2.0.0-SNAPSHOT update causes compilation fail

I've been using 0.2.0-SNAPSHOT for a while now and usually everything works fine (which is excellent).
But I just tried to compile my clojure/android project and lein pulled in lein-droid-0.2.0-20130906.220219-16.pom. SInce then my app refuses to build successfully.

The stacktrace:

Retrieving lein-droid/lein-droid/0.2.0-SNAPSHOT/lein-droid-0.2.0-20130906.220219-16.jar from clojars
Generating R.java...
Compiling 1 source files to /Users/j/Development/clojure/autonomer/target/classes
Compiling Clojure files...
Build type: debug, dynamic compilation: enabled, remote REPL: enabled.
Exception in thread "main" java.lang.RuntimeException: Unable to resolve var: o/*nrepl-port* in this context, compiling:(NO_SOURCE_PATH:1:136)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6567)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3624)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6562)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3624)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6562)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5708)
    at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:6009)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5708)
    at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5139)
    at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3751)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6558)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.eval(Compiler.java:6616)
    at clojure.lang.Compiler.eval(Compiler.java:6609)
    at clojure.lang.Compiler.eval(Compiler.java:6582)
    at clojure.core$eval.invoke(core.clj:2852)
    at clojure.main$eval_opt.invoke(main.clj:313)
    at clojure.main$initialize.invoke(main.clj:332)
    at clojure.main$null_opt.invoke(main.clj:367)
    at clojure.main$main.doInvoke(main.clj:445)
    at clojure.lang.RestFn.invoke(RestFn.java:421)
    at clojure.lang.Var.invoke(Var.java:419)
    at clojure.lang.AFn.applyToHelper(AFn.java:163)
    at clojure.lang.Var.applyTo(Var.java:532)
    at clojure.main.main(main.java:37)
Caused by: java.lang.RuntimeException: Unable to resolve var: o/*nrepl-port* in this context
    at clojure.lang.Util.runtimeException(Util.java:219)
    at clojure.lang.Compiler$TheVarExpr$Parser.parse(Compiler.java:650)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
    ... 33 more
Compilation failed.

I've since then also tried 0.2.0-beta2 and 0.2.0-beta3.
0.2.0-beta2 works, but 0.2.0-beta3 also refuses to build, and looking at the clojars upload time stamp I'm guessing the issue with beta3 is related to the one in the current 0.2.0-SNAPSHOT.

Any idea what's causing it @alexander-yakushev?

Completing in REPL in debug profile

When you hit tab in the on-device REPL you get this:

VerifyError reply/exports$eval139  java.lang.Class.newInstanceImpl
(Class.java:-2) reply.eval-modes.nrepl=> CompilerException
java.lang.ClassNotFoundException: complete.core, compiling:
(NO_SOURCE_PATH:1) 

I assume it’s because of the stripped clojure and/or leiningen core on the device.

Could it be made possible to not strip this functionality when using the :dev profile?

Dex error while creating APK

I get an error when trying to create an APK file. lein droid build seems to work fine, but no classes are generated.

$ lein droid apk
Crunching resources...
Packaging resources...
Creating APK...
The path /home/darth10/pymatter/mojo/target/classes.dex doesn't exist. Abort execution.

Here's the main activity code.

(ns com.darth10.mojo.main
  (:use [neko.activity :only [defactivity set-content-view!]]
        [neko.threading :only [on-ui]]
        [neko.ui :only [make-ui]]
        [neko.application :only [defapplication]]))

(defapplication com.darth10.mojo.Application)

(defactivity com.darth10.mojo.MainActivity
  :def a
  :on-create
  (fn [this bundle]
    (on-ui
     (set-content-view! a
      (make-ui [:linear-layout {}
                [:text-view {:text "Hello from Clojure!"}]])))))

And the project.clj.

(defproject mojo/mojo "0.0.1-SNAPSHOT"
  :description "FIXME: Android project description"
  :url "http://example.com/FIXME"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :min-lein-version "2.0.0"
  :warn-on-reflection true
  :source-paths ["src/clojure"]
  :java-source-paths ["src/java" "gen"]
  ;; The following two definitions are optional. The default
  ;; target-path is "target", but you can change it to whatever you like.
  ;; :target-path "bin"
  ;; :compile-path "bin/classes"
  :dependencies [[android/clojure "1.4.0"]
                 [neko/neko "2.0.0-beta1"]]
  :profiles
  {:dev {:dependencies [[android/tools.nrepl "0.2.0-bigstack"]]
         :android
         {:aot :all-with-unused
          :keystore-path "/home/darth10/.android/debug.keystore"
          :key-alias "debug"}}
   :release {:android
             {:aot :all
              :keystore-path "/home/darth10/.android/debug.keystore"
              :key-alias "debug"}}}
  :android {;; Specify the path to the Android SDK directory either
            ;; here or in your ~/.lein/profiles.clj file.
            ;; :sdk-path "/home/user/path/to/android-sdk/"
            :target-version "10"
            :aot-exclude-ns ["clojure.parallel"]})

So looks like the DEX file is missing. But lein droid create-dex fails silently. With DEBUG=1, I get this NPE.

$ DEBUG=1 lein droid create-dex
Leiningen's classpath: /home/darth10/.lein/self-installs/leiningen-2.0.0-preview10-standalone.jar
Creating DEX....
java.lang.NullPointerException
    at org.sonatype.aether.util.version.GenericVersion$Tokenizer.<init>(GenericVersion.java:183)
    at org.sonatype.aether.util.version.GenericVersion.parse(GenericVersion.java:51)
    at org.sonatype.aether.util.version.GenericVersion.<init>(GenericVersion.java:43)
    at org.sonatype.aether.util.version.GenericVersionScheme.parseVersion(GenericVersionScheme.java:46)
    at leiningen.droid.classpath$remove_duplicate_dependencies$iter__290__294$fn__295$fn__306.invoke(classpath.clj:36)
    at clojure.lang.ArrayChunk.reduce(ArrayChunk.java:58)
    at clojure.core.protocols$fn__5890.invoke(protocols.clj:94)
    at clojure.core.protocols$fn__5854$G__5849__5863.invoke(protocols.clj:19)
    at clojure.core.protocols$seq_reduce.invoke(protocols.clj:27)
    at clojure.core.protocols$fn__5873.invoke(protocols.clj:59)
    at clojure.core.protocols$fn__5828$G__5823__5841.invoke(protocols.clj:13)
    at clojure.core$reduce.invoke(core.clj:6028)
    at leiningen.droid.classpath$remove_duplicate_dependencies$iter__290__294$fn__295.invoke(classpath.clj:36)
    at clojure.lang.LazySeq.sval(LazySeq.java:42)
    at clojure.lang.LazySeq.seq(LazySeq.java:60)
    at clojure.lang.Cons.next(Cons.java:39)
    at clojure.lang.RT.next(RT.java:587)
    at clojure.core$next.invoke(core.clj:64)
    at clojure.core$zipmap.invoke(core.clj:2663)
    at leiningen.droid.classpath$dependencies_hook.doInvoke(classpath.clj:51)
    at clojure.lang.RestFn.invoke(RestFn.java:445)
    at clojure.lang.Var.invoke(Var.java:423)
    at clojure.lang.AFn.applyToHelper(AFn.java:167)
    at clojure.lang.Var.applyTo(Var.java:532)
    at clojure.core$apply.invoke(core.clj:603)
    at robert.hooke$compose_hooks$fn__249.doInvoke(hooke.clj:33)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at clojure.core$apply.invoke(core.clj:601)
    at robert.hooke$run_hooks.invoke(hooke.clj:39)
    at robert.hooke$prepare_for_hooks$fn__254$fn__255.doInvoke(hooke.clj:47)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at clojure.lang.AFunction$1.doInvoke(AFunction.java:29)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at clojure.core$apply.invoke(core.clj:605)
    at leiningen.core.classpath$resolve_dependencies.doInvoke(classpath.clj:144)
    at clojure.lang.RestFn.invoke(RestFn.java:425)
    at leiningen.droid.build$create_dex.invoke(build.clj:33)
    at leiningen.droid$execute_subtask.invoke(droid.clj:90)
    at leiningen.droid$droid.doInvoke(droid.clj:74)
    at clojure.lang.RestFn.invoke(RestFn.java:423)
    at clojure.lang.Var.invoke(Var.java:419)
    at clojure.lang.AFn.applyToHelper(AFn.java:163)
    at clojure.lang.Var.applyTo(Var.java:532)
    at clojure.core$apply.invoke(core.clj:603)
    at leiningen.core.main$resolve_task$fn__836.doInvoke(main.clj:123)
    at clojure.lang.RestFn.applyTo(RestFn.java:139)
    at clojure.lang.AFunction$1.doInvoke(AFunction.java:29)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at clojure.core$apply.invoke(core.clj:603)
    at leiningen.core.main$apply_task.invoke(main.clj:146)
    at leiningen.core.main$_main$fn__895.invoke(main.clj:223)
    at leiningen.core.main$_main.doInvoke(main.clj:208)
    at clojure.lang.RestFn.invoke(RestFn.java:421)
    at clojure.lang.Var.invoke(Var.java:419)
    at clojure.lang.AFn.applyToHelper(AFn.java:163)
    at clojure.lang.Var.applyTo(Var.java:532)
    at clojure.core$apply.invoke(core.clj:601)
    at clojure.main$main_opt.invoke(main.clj:324)
    at clojure.main$main.doInvoke(main.clj:427)
    at clojure.lang.RestFn.invoke(RestFn.java:457)
    at clojure.lang.Var.invoke(Var.java:427)
    at clojure.lang.AFn.applyToHelper(AFn.java:172)
    at clojure.lang.Var.applyTo(Var.java:532)
    at clojure.main.main(main.java:37)

Any help please? 😄

proxy works in REPL but not when building

I have a DatePickerDialog in my app. I am using proxy to make an instance of an anonymous class. It works fine through the REPL. But when I run lein droid build it does not compile:

Exception in thread "main" java.lang.RuntimeException: Stub!, compiling:(main.clj:61:3)

Here is the (unfinished) code for my proxy object:

(def date-picker 
  (proxy [DialogFragment] []
    (onCreateDialog [savedInstanceState]
      (let [c (Calendar/getInstance)
            year (.get c Calendar/YEAR)
            month (.get c Calendar/MONTH)
            day (.get c Calendar/DAY_OF_MONTH)]
        (DatePickerDialog. myActivity this year month day)))))

I tried adding a declare statement near the top of my code, but apparently that isn't the problem:

(declare android.app.DialogFragment date-picker)

Can't run app created with lein-droid 0.2.0-preview4

I created a lein-droid project with 0.2.0-preview4. It builds fine, but when the app runs, I get this message on my device:

Unfortunately, Test has stopped

And in adb logcat:

11-12 19:40:09.288  2195  2195 W dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x40d99438)
11-12 19:40:09.288  2195  2195 E AndroidRuntime: FATAL EXCEPTION: main
11-12 19:40:09.288  2195  2195 E AndroidRuntime: java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{org.stuff.test/org.stuff.test.SplashActivity}: java.lang.ClassNotFoundException: Didn't find class "org.stuff.test.SplashActivity" on path: /data/app/org.stuff.test-1.apk
11-12 19:40:09.288  2195  2195 E AndroidRuntime:    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2037)
11-12 19:40:09.288  2195  2195 E AndroidRuntime:    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2151)
11-12 19:40:09.288  2195  2195 E AndroidRuntime:    at android.app.ActivityThread.access$700(ActivityThread.java:139)
11-12 19:40:09.288  2195  2195 E AndroidRuntime:    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1244)
11-12 19:40:09.288  2195  2195 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:99)
11-12 19:40:09.288  2195  2195 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:137)
11-12 19:40:09.288  2195  2195 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:5003)
11-12 19:40:09.288  2195  2195 E AndroidRuntime:    at java.lang.reflect.Method.invokeNative(Native Method)
11-12 19:40:09.288  2195  2195 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Method.java:511)
11-12 19:40:09.288  2195  2195 E AndroidRuntime:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)
11-12 19:40:09.288  2195  2195 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:558)
11-12 19:40:09.288  2195  2195 E AndroidRuntime:    at dalvik.system.NativeStart.main(Native Method)
11-12 19:40:09.288  2195  2195 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "org.stuff.test.SplashActivity" on path: /data/app/org.stuff.test-1.apk
11-12 19:40:09.288  2195  2195 E AndroidRuntime:    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
11-12 19:40:09.288  2195  2195 E AndroidRuntime:    at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
11-12 19:40:09.288  2195  2195 E AndroidRuntime:    at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
11-12 19:40:09.288  2195  2195 E AndroidRuntime:    at android.app.Instrumentation.newActivity(Instrumentation.java:1053)
11-12 19:40:09.288  2195  2195 E AndroidRuntime:    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2028)
11-12 19:40:09.288  2195  2195 E AndroidRuntime:    ... 11 more
11-12 19:40:09.298   729  1053 W ActivityManager:   Force finishing activity org.stuff.test/.SplashActivity

the built in sample cant build with lein

hi man ,

i can build the sample with lein droid build :

Exception in thread "main" java.io.FileNotFoundException: Could not locate neko/init/options__init.class or neko/init/options.clj on classpath: 
    at clojure.lang.RT.load(RT.java:457)
    at clojure.lang.RT.load(RT.java:425)
    at clojure.core$load$fn__4890.invoke(core.clj:5415)
    at clojure.core$load.doInvoke(core.clj:5414)
    at clojure.lang.RestFn.invoke(RestFn.java:408)
    at clojure.core$load_one.invoke(core.clj:5227)
    at clojure.core$load_lib.doInvoke(core.clj:5264)
    at clojure.lang.RestFn.applyTo(RestFn.java:142)
    at clojure.core$apply.invoke(core.clj:603)
    at clojure.core$load_libs.doInvoke(core.clj:5298)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at clojure.core$apply.invoke(core.clj:603)
    at clojure.core$require.doInvoke(core.clj:5381)
    at clojure.lang.RestFn.invoke(RestFn.java:408)
    at user$eval1.invoke(NO_SOURCE_FILE:1)
    at clojure.lang.Compiler.eval(Compiler.java:6511)
    at clojure.lang.Compiler.eval(Compiler.java:6500)
    at clojure.lang.Compiler.eval(Compiler.java:6477)
    at clojure.core$eval.invoke(core.clj:2797)
    at clojure.main$eval_opt.invoke(main.clj:302)
    at clojure.main$initialize.invoke(main.clj:321)
    at clojure.main$null_opt.invoke(main.clj:354)
    at clojure.main$main.doInvoke(main.clj:432)
    at clojure.lang.RestFn.invoke(RestFn.java:421)
    at clojure.lang.Var.invoke(Var.java:419)
    at clojure.lang.AFn.applyToHelper(AFn.java:163)
    at clojure.lang.Var.applyTo(Var.java:532)
    at clojure.main.main(main.java:37)

is it the neko 1.2.0-SNAPSHOT problem??

"lein droid build" fails on Windows with JDK7

I'm on Windows 7 x64, and "lein droid build" fails. It initially couldn't find /platform-tools/aapt and /platform-tools/dx, because on windows they are "aapt.exe" and "dx.bat". I made symbolic links to both using mklink, but it still can't run dx.bat because it says it is "not a valid Win32 application". I believe this is because ProcessBuilder can't run *.bat files directly.

I'm not sure if there is a simple way to normalize all the pathnames in the code to make Windows work -- it may be more effort than it is worth. For now, I am booting up an Ubuntu VM, but creating the DEX file is taking forever (over 24 hours) because I have hundreds of *.java files in my project, so I was hoping to try compiling it in my host OS for speed.

"lein droid release" doesn't compile necessary namespaces

Using "lein droid release" was creating a non-functioning apk because it wasn't compiling any namespace except the ones listed in always-compile-ns.

After further research, I noticed that lein-droid uses the leiningen.compile/stale-namespaces function in release mode. This may be the problem, because that function uses the compilable-namespaces function, which expects :aot to be at the root of the project map that you supply.

Since lein-droid projects don't have :aot defined at the root of the map, it can't find it. The workaround (obviously) is to add :aot :all to the root of the project.clj map.

Leiningen can't find "templates/AndroidManifest.xml"

When I try to create a new project with "lein droid new", I get the following error:

java.io.FileNotFoundException: templates\AndroidManifest.xml (╤шёЄхьх эх єфрхЄё  эрщЄш єърчрээ√щ яєЄ№) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(Unknown Source) at clojure.java.io$fn__8638.invoke(io.clj:233) at clojure.java.io$fn__8577$G__8542__8584.invoke(io.clj:73) at clojure.java.io$fn__8650.invoke(io.clj:262) at clojure.java.io$fn__8577$G__8542__8584.invoke(io.clj:73) at clojure.java.io$fn__8612.invoke(io.clj:169) at clojure.java.io$fn__8551$G__8546__8558.invoke(io.clj:73) at clojure.java.io$reader.doInvoke(io.clj:106) at clojure.lang.RestFn.invoke(RestFn.java:410) at leiningen.new.templates$slurp_resource.invoke(templates.clj:29) at leiningen.droid.new$renderer$fn__915.doInvoke(new.clj:22) at clojure.lang.RestFn.invoke(RestFn.java:423) at leiningen.droid.new$new.doInvoke(new.clj:81) at clojure.lang.RestFn.invoke(RestFn.java:425) at clojure.lang.AFn.applyToHelper(AFn.java:163) at clojure.lang.RestFn.applyTo(RestFn.java:132) at clojure.core$apply.invoke(core.clj:617) at leiningen.droid$execute_subtask.invoke(droid.clj:85) at leiningen.droid$droid.doInvoke(droid.clj:74) at clojure.lang.RestFn.invoke(RestFn.java:460) at clojure.lang.Var.invoke(Var.java:427) at clojure.lang.AFn.applyToHelper(AFn.java:172) at clojure.lang.Var.applyTo(Var.java:532) at clojure.core$apply.invoke(core.clj:619) at leiningen.core.main$resolve_task$fn__2165.doInvoke(main.clj:186) at clojure.lang.RestFn.applyTo(RestFn.java:139) at clojure.lang.AFunction$1.doInvoke(AFunction.java:29) at clojure.lang.RestFn.applyTo(RestFn.java:137) at clojure.core$apply.invoke(core.clj:619) at leiningen.core.main$apply_task.invoke(main.clj:226) at leiningen.core.main$_main$fn__2232.invoke(main.clj:292) at leiningen.core.main$_main.doInvoke(main.clj:281) at clojure.lang.RestFn.invoke(RestFn.java:457) at clojure.lang.Var.invoke(Var.java:427) at clojure.lang.AFn.applyToHelper(AFn.java:172) at clojure.lang.Var.applyTo(Var.java:532) at clojure.core$apply.invoke(core.clj:617) at clojure.main$main_opt.invoke(main.clj:335) at clojure.main$main.doInvoke(main.clj:440) at clojure.lang.RestFn.invoke(RestFn.java:512) at clojure.lang.Var.invoke(Var.java:435) at clojure.lang.AFn.applyToHelper(AFn.java:185) at clojure.lang.Var.applyTo(Var.java:532) at clojure.main.main(main.java:37)

However, the file is there, in the lein-droid jar, and lein droid prints the "droid" command set ok. I would've assumed, the problem is with file access permissions, but I'm on Windows and UAC is off...

Can't install more than one lein-droid app onto my device

I am using the app generated by the Tutorial as a template for my own app. It is exactly the same so far but with changed names (and target sdk "17"). The original app installs and runs just fine. When I run 'lein droid doall' on my copy there is an error on the install step:

Installing APK...
/home/kris/adt-bundle-linux-x86_64-20130522/sdk/platform-tools/adb -s TA30000IVO install -r /home/kris/src/myapp/target/myapp-debug.apk
3731 KB/s (2133932 bytes in 0.558s)
    pkg: /data/local/tmp/myapp-debug.apk
Failure [INSTALL_FAILED_OLDER_SDK]

Abort execution.

I wonder why this happens because it targets the same sdk as the app which does install. Is it because only one lein-droid app can be installed on a single device?

I am using:
clojure-android 1.5.1-SNAPSHOT
neko 3.0.0-SNAPSHOT
lein 2.3.1
java 1.6.0_45

Error on lein droid new

Hi, Alex. I am going through your Tutorial and am getting an error when I enter the command:

lein droid new clojuroid org.stuff.clojuroid :activity MyActivity :target-sdk 11 :app-name ClojureMeetsAndroid

and the error is:

java.net.URL cannot be cast to java.lang.String

I tried running the command without the optional arguments and still getting the same error.

I am running Linux Mint 14 with lein 2.0.0 and Java 1.6.0_45. I am on a 64-bit system.

neko dependency missing

Where does the [neko/neko "1.0.1-SNAPSHOT"] dependency live?

colin:clojuroid/ $ lein droid build
Could not find artifact neko:neko:pom:1.0.1-SNAPSHOT in central (http://repo1.maven.org/maven2)
Could not find artifact neko:neko:pom:1.0.1-SNAPSHOT in clojars (http://clojars.org/repo/)
Could not find artifact neko:neko:jar:1.0.1-SNAPSHOT in central (http://repo1.maven.org/maven2)
Could not find artifact neko:neko:jar:1.0.1-SNAPSHOT in clojars (http://clojars.org/repo/)
org.sonatype.aether.resolution.DependencyResolutionException: Could not find artifact neko:neko:jar:1.0.1-SNAPSHOT in central (http://repo1.maven.org/maven2)

Is there another repository I need to add to profiles.clj or somewhere else?

SecurityException when running lein droid doall

I created a new project using lein-droid, and except for setting the path to the android sdk, did not do anything. I tried to run lein droid doall and got the following exception. I am using lein-droid 0.2.0-preview2, neko 3.0.0-preview3 and Java 1.6.0_45 64 bit.

Compiling clojure.java.browse
Compiling compliment.sources.class-members
Compiling neko.ui.listview
Compiling compliment.sources
Compiling clojure.data
Compiling clojure.tools.nrepl.middleware.interruptible-eval
Compiling clojure.tools.nrepl.ack
Compiling clojure.tools.nrepl.server
Compiling clojure.tools.nrepl.misc
Compiling compliment.sources.ns-mappings
Compiling neko.init.options
Compiling neko.listeners.adapter-view
Compiling neko.doc
Exception in thread "main" java.lang.SecurityException: Prohibited package name: java.lang, compiling:(neko/resource.clj:58:23)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6567)
at clojure.lang.Compiler.analyze(Compiler.java:6361)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6548)
at clojure.lang.Compiler.analyze(Compiler.java:6361)
at clojure.lang.Compiler.analyze(Compiler.java:6322)
at clojure.lang.Compiler$IfExpr$Parser.parse(Compiler.java:2669)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
at clojure.lang.Compiler.analyze(Compiler.java:6361)
at clojure.lang.Compiler.access$100(Compiler.java:37)
at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:5973)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
at clojure.lang.Compiler.analyze(Compiler.java:6361)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6548)
at clojure.lang.Compiler.analyze(Compiler.java:6361)
at clojure.lang.Compiler.analyze(Compiler.java:6322)
at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5708)
at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5139)
at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3751)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6558)
at clojure.lang.Compiler.analyze(Compiler.java:6361)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6548)
at clojure.lang.Compiler.analyze(Compiler.java:6361)
at clojure.lang.Compiler.access$100(Compiler.java:37)
at clojure.lang.Compiler$DefExpr$Parser.parse(Compiler.java:529)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
at clojure.lang.Compiler.analyze(Compiler.java:6361)
at clojure.lang.Compiler.analyze(Compiler.java:6322)
at clojure.lang.Compiler.compile1(Compiler.java:7148)
at clojure.lang.Compiler.compile(Compiler.java:7219)
at clojure.lang.RT.compile(RT.java:423)
at clojure.lang.RT.load(RT.java:463)
at clojure.lang.RT.load(RT.java:436)
at clojure.core$load$fn__5018.invoke(core.clj:5530)
at clojure.core$load.doInvoke(core.clj:5529)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5336)
at clojure.core$load_lib$fn__4967.invoke(core.clj:5375)
at clojure.core$load_lib.doInvoke(core.clj:5374)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:619)
at clojure.core$load_libs.doInvoke(core.clj:5413)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:619)
at clojure.core$require.doInvoke(core.clj:5496)
at clojure.lang.RestFn.invoke(RestFn.java:482)
at neko.ui.traits$loading__4910__auto__.invoke(traits.clj:12)
at clojure.lang.AFn.applyToHelper(AFn.java:159)
at clojure.lang.AFn.applyTo(AFn.java:151)
at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:3458)
at clojure.lang.Compiler.compile1(Compiler.java:7153)
at clojure.lang.Compiler.compile1(Compiler.java:7143)
at clojure.lang.Compiler.compile(Compiler.java:7219)
at clojure.lang.RT.compile(RT.java:423)
at clojure.lang.RT.load(RT.java:463)
at clojure.lang.RT.load(RT.java:436)
at clojure.core$load$fn__5018.invoke(core.clj:5530)
at clojure.core$load.doInvoke(core.clj:5529)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5336)
at clojure.core$load_lib$fn__4967.invoke(core.clj:5375)
at clojure.core$load_lib.doInvoke(core.clj:5374)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:619)
at clojure.core$load_libs.doInvoke(core.clj:5413)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:619)
at clojure.core$require.doInvoke(core.clj:5496)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at neko.doc$loading__4910__auto__.invoke(doc.clj:12)
at clojure.lang.AFn.applyToHelper(AFn.java:159)
at clojure.lang.AFn.applyTo(AFn.java:151)
at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:3458)
at clojure.lang.Compiler.compile1(Compiler.java:7153)
at clojure.lang.Compiler.compile1(Compiler.java:7143)
at clojure.lang.Compiler.compile(Compiler.java:7219)
at clojure.lang.RT.compile(RT.java:423)
at clojure.lang.RT.load(RT.java:463)
at clojure.lang.RT.load(RT.java:436)
at clojure.core$load$fn__5018.invoke(core.clj:5530)
at clojure.core$load.doInvoke(core.clj:5529)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5336)
at clojure.core$compile$fn__5023.invoke(core.clj:5541)
at clojure.core$compile.invoke(core.clj:5540)
at user$eval7.invoke(form-init5108864013584854669.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6619)
at clojure.lang.Compiler.eval(Compiler.java:6609)
at clojure.lang.Compiler.load(Compiler.java:7064)
at clojure.lang.Compiler.loadFile(Compiler.java:7020)
at clojure.main$load_script.invoke(main.clj:299)
at clojure.main$init_opt.invoke(main.clj:304)
at clojure.main$initialize.invoke(main.clj:332)
at clojure.main$null_opt.invoke(main.clj:367)
at clojure.main$main.doInvoke(main.clj:445)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:419)
at clojure.lang.AFn.applyToHelper(AFn.java:163)
at clojure.lang.Var.applyTo(Var.java:532)
at clojure.main.main(main.java:37)
Caused by: java.lang.SecurityException: Prohibited package name: java.lang
at java.lang.ClassLoader.preDefineClass(ClassLoader.java:479)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:625)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2436)
at java.lang.Class.privateGetPublicMethods(Class.java:2556)
at java.lang.Class.getMethods(Class.java:1412)
at clojure.lang.Reflector.getMethods(Reflector.java:357)
at clojure.lang.Compiler$InstanceMethodExpr.(Compiler.java:1395)
at clojure.lang.Compiler$HostExpr$Parser.parse(Compiler.java:952)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
... 98 more
Compilation failed.

ClassNotFoundException SlashActivity

Hi,

I am trying to make my demo clojure android app running but I get CNFE when executing lein run.

I am using lein-droid 0.2.0-preview1 and neko 3.0.0-preview1.
Lein: Leiningen 2.2.0 on Java 1.6.0_45 Java HotSpot(TM) 64-Bit Server VM

The error message I get:
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.alma2/com.alma2.SplashActivity}: java.lang.ClassNotFoundException: Didn't find class "com.alma2.SplashActivity" on path: /data/app/com.alma2-1.apk

While the class file can be found in the target/classes folder, so I suppose it is part of the apk.

Any idea?

Thanks,
Mark

Cannot get nRepl to connect.

Version: [lein-droid "0.1.0-beta2"]
Output

$ DEBUG=1  lein do droid forward-port, droid repl
Leiningen's classpath: /home/waliao/Fiddle/Java/libs/*:/usr/share/java/*:./:/home/wliao/.lein/self-installs/leiningen-2.1.2-standalone.jar
Applying task do to (droid forward-port, droid repl)
Applying task droid to (forward-port)
Binding device port 9999 to local port 9999 ...
/home/wliao/Fiddle/Java/android-sdk-linux//platform-tools/adb devices
List of devices attached  emulator-5554 device 
/home/wliao/Fiddle/Java/android-sdk-linux//platform-tools/adb -s emulator-5554 forward tcp:9999 tcp:9999

Applying task droid to (repl)
SocketException The transport's socket appears to have lost its connection to the nREPL server
    clojure.tools.nrepl.transport/bencode/fn--3337/fn--3338 (transport.clj:95)
    clojure.tools.nrepl.transport/bencode/fn--3337 (transport.clj:95)
    clojure.tools.nrepl.transport/fn-transport/fn--3311 (transport.clj:42)
    clojure.core/binding-conveyor-fn/fn--4107 (core.clj:1836)
    java.util.concurrent.FutureTask$Sync.innerRun (FutureTask.java:334)
    java.util.concurrent.FutureTask.run (FutureTask.java:166)
    java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1145)
    java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:615)
    java.lang.Thread.run (Thread.java:722)
Bye for now!

The emulator is running:
Screenshot - 04012013 - 06:07:13 PM

Port opened:

$ lsof -P -iTCP:9999
COMMAND   PID  USER   FD   TYPE  DEVICE SIZE/OFF NODE NAME
adb     21732 wliao   12u  IPv4 1142338      0t0  TCP localhost:9999 (LISTEN)

Compilation fails when using neko 3.0.0-preview2

I am trying to build my app using neko 3.0.0-preview2 instead of neko-3.0.0-preview1 (which compiles fine). I get this at the terminal when I compile:

Generating R.java...
Compiling 1 source files to /home/kris/src/events/target/classes
WARNING: :warn-on-reflection is deprecated; use :global-vars.
Compiling Clojure files...
Build type: debug, dynamic compilation: enabled, remote REPL: enabled.
WARNING: :warn-on-reflection is deprecated; use :global-vars.
Compiling clojure.java.browse
Compiling neko.ui.listview
Compiling clojure.data
Compiling clojure.tools.nrepl.middleware.interruptible-eval
Compiling clojure.tools.nrepl.ack
Compiling clojure.tools.nrepl.server
Compiling clojure.tools.nrepl.misc
Compiling neko.init.options
Compiling neko.listeners.adapter-view
Compiling neko.doc
Reflection warning, neko/ui/traits.clj:206:5 - call to setMargins can't be resolved.
Reflection warning, neko/ui/traits.clj:281:12 - call to android.widget.RelativeLayout$LayoutParams ctor can't be resolved.
Exception in thread "main" java.lang.ExceptionInInitializerError
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:270)
    at clojure.lang.RT.loadClassForName(RT.java:2145)
    at clojure.lang.RT.load(RT.java:455)
    at clojure.lang.RT.load(RT.java:436)
    at clojure.core$load$fn__5018.invoke(core.clj:5530)
    at clojure.core$load.doInvoke(core.clj:5529)
    at clojure.lang.RestFn.invoke(RestFn.java:408)
    at clojure.core$load_one.invoke(core.clj:5336)
    at clojure.core$compile$fn__5023.invoke(core.clj:5541)
    at clojure.core$compile.invoke(core.clj:5540)
    at user$eval7.invoke(form-init6218427716129376258.clj:1)
    at clojure.lang.Compiler.eval(Compiler.java:6619)
    at clojure.lang.Compiler.eval(Compiler.java:6609)
    at clojure.lang.Compiler.load(Compiler.java:7064)
    at clojure.lang.Compiler.loadFile(Compiler.java:7020)
    at clojure.main$load_script.invoke(main.clj:299)
    at clojure.main$init_opt.invoke(main.clj:304)
    at clojure.main$initialize.invoke(main.clj:332)
    at clojure.main$null_opt.invoke(main.clj:367)
    at clojure.main$main.doInvoke(main.clj:445)
    at clojure.lang.RestFn.invoke(RestFn.java:421)
    at clojure.lang.Var.invoke(Var.java:419)
    at clojure.lang.AFn.applyToHelper(AFn.java:163)
    at clojure.lang.Var.applyTo(Var.java:532)
    at clojure.main.main(main.java:37)
Caused by: java.lang.ClassNotFoundException: neko.log, compiling:(neko/ui/traits.clj:299:3)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6567)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5708)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.access$100(Compiler.java:37)
    at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:5973)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6548)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$IfExpr$Parser.parse(Compiler.java:2669)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5708)
    at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:6009)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6548)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5708)
    at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5139)
    at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3751)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6558)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6548)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$HostExpr$Parser.parse(Compiler.java:948)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler.compile1(Compiler.java:7148)
    at clojure.lang.Compiler.compile1(Compiler.java:7143)
    at clojure.lang.Compiler.compile(Compiler.java:7219)
    at clojure.lang.RT.compile(RT.java:423)
    at clojure.lang.RT.load(RT.java:463)
    at clojure.lang.RT.load(RT.java:436)
    at clojure.core$load$fn__5018.invoke(core.clj:5530)
    at clojure.core$load.doInvoke(core.clj:5529)
    at clojure.lang.RestFn.invoke(RestFn.java:408)
    at clojure.core$load_one.invoke(core.clj:5336)
    at clojure.core$load_lib$fn__4967.invoke(core.clj:5375)
    at clojure.core$load_lib.doInvoke(core.clj:5374)
    at clojure.lang.RestFn.applyTo(RestFn.java:142)
    at clojure.core$apply.invoke(core.clj:619)
    at clojure.core$load_libs.doInvoke(core.clj:5413)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at clojure.core$apply.invoke(core.clj:619)
    at clojure.core$require.doInvoke(core.clj:5496)
    at clojure.lang.RestFn.invoke(RestFn.java:421)
    at neko.doc$loading__4910__auto__.invoke(doc.clj:12)
    at neko.doc__init.load(Unknown Source)
    at neko.doc__init.<clinit>(Unknown Source)
    ... 26 more
Caused by: java.lang.ClassNotFoundException: neko.log
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at clojure.lang.DynamicClassLoader.findClass(DynamicClassLoader.java:65)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:270)
    at clojure.lang.RT.classForName(RT.java:2117)
    at clojure.lang.Compiler$HostExpr.maybeClass(Compiler.java:969)
    at clojure.lang.Compiler$HostExpr.access$400(Compiler.java:747)
    at clojure.lang.Compiler.macroexpand1(Compiler.java:6499)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6546)
    ... 83 more
Compilation failed.

robert.hooke cause error with "with-profile"

Hi.

I'm develop https://github.com/ayamada/clan .

I did

lein with-profile prof droid release build

, but I got error

Performing task 'droid' with profile(s): 'prof'
Error encountered performing task 'droid' with profile(s): 'prof'
java.lang.IllegalStateException: Attempting to call unbound fn: #'robert.hooke/end-scope
        at clojure.lang.Var$Unbound.throwArity(Var.java:43)
        at clojure.lang.AFn.invoke(AFn.java:35)
        at leiningen.with_profile$with_profiles_STAR_.invoke(with_profile.clj:10)
        at leiningen.with_profile$with_profile$fn__5587.invoke(with_profile.clj:63)
        at leiningen.with_profile$with_profile.doInvoke(with_profile.clj:61)
        at clojure.lang.RestFn.invoke(RestFn.java:494)
        at clojure.lang.Var.invoke(Var.java:431)
        at clojure.lang.AFn.applyToHelper(AFn.java:178)
        at clojure.lang.Var.applyTo(Var.java:532)
        at clojure.core$apply.invoke(core.clj:619)
        at leiningen.core.main$resolve_task$fn__1833.doInvoke(main.clj:186)
        at clojure.lang.RestFn.applyTo(RestFn.java:139)
        at clojure.lang.AFunction$1.doInvoke(AFunction.java:29)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.core$apply.invoke(core.clj:619)
        at leiningen.core.main$apply_task.invoke(main.clj:226)
        at leiningen.core.main$_main$fn__1900.invoke(main.clj:291)
        at leiningen.core.main$_main.doInvoke(main.clj:280)
        at clojure.lang.RestFn.invoke(RestFn.java:482)
        at clojure.lang.Var.invoke(Var.java:431)
        at clojure.lang.AFn.applyToHelper(AFn.java:178)
        at clojure.lang.Var.applyTo(Var.java:532)
        at clojure.core$apply.invoke(core.clj:617)
        at clojure.main$main_opt.invoke(main.clj:335)
        at clojure.main$main.doInvoke(main.clj:440)
        at clojure.lang.RestFn.invoke(RestFn.java:551)
        at clojure.lang.Var.invoke(Var.java:440)
        at clojure.lang.AFn.applyToHelper(AFn.java:193)
        at clojure.lang.Var.applyTo(Var.java:532)
        at clojure.main.main(main.java:37)

But below code was work.

lein droid release build

I guess, that was caused by robert.hooke's incompatible version on lein and lein-droid.

I use lein-2.1.0 (Tutorial say to use 2.0, but lein-2.0.0 cannot work by robert.hooke's another error).

I use lein-droid 0.1.0 from clojars.
Old version of lein-droid(without robert.hooke) can work, but I want to use new feature ":native-libraries-paths".

Having trouble with using the REPL to execute code on my device

I am using the code generated by following the Tutorial. The only change I made is change the target sdk to 17. When I reach the lein droid doall step, the app opens on my device, then I connect to the port through nREPL in emacs. I then enter the command (in-ns 'org.stuff.clojuroid.main). I start evaluating the forms in the source code to see that the REPL works:

(ns org.stuff.clojuroid.main
  (:use [neko.activity :only [defactivity set-content-view!]]
        [neko.threading :only [on-ui]]
        [neko.ui :only [make-ui]]
        [neko.application :only [defapplication]]))

(defapplication org.stuff.clojuroid.Application)

(defactivity org.stuff.clojuroid.MyActivity
  :def a
  :on-create
  (fn [this bundle]
    (on-ui
     (set-content-view! a
      (make-ui [:linear-layout {}
                [:text-view {:text "Hello from Clojure!"}]])))))

The first two forms return nil. When I evaluate the defactivity form, I get this error:

clojure.lang.Compiler$CompilerException: java.lang.NoClassDefFoundError: android/os/UserHandle, compiling:(NO_SOURCE_PATH:1:1)
 at clojure.lang.Compiler.analyzeSeq (Compiler.java:6567)
    clojure.lang.Compiler.analyze (Compiler.java:6361)
    clojure.lang.Compiler.analyzeSeq (Compiler.java:6548)
    clojure.lang.Compiler.analyze (Compiler.java:6361)
    clojure.lang.Compiler.analyze (Compiler.java:6322)
    clojure.lang.Compiler$BodyExpr$Parser.parse (Compiler.java:5708)
    clojure.lang.Compiler$FnMethod.parse (Compiler.java:5139)
    clojure.lang.Compiler$FnExpr.parse (Compiler.java:3751)
    clojure.lang.Compiler.analyzeSeq (Compiler.java:6558)
    clojure.lang.Compiler.analyze (Compiler.java:6361)
    clojure.lang.Compiler.analyzeSeq (Compiler.java:6548)
    clojure.lang.Compiler.analyze (Compiler.java:6361)
    clojure.lang.Compiler.access$100 (Compiler.java:37)
    clojure.lang.Compiler$DefExpr$Parser.parse (Compiler.java:529)
    clojure.lang.Compiler.analyzeSeq (Compiler.java:6560)
    clojure.lang.Compiler.analyze (Compiler.java:6361)
    clojure.lang.Compiler.analyze (Compiler.java:6322)
    clojure.lang.Compiler.eval (Compiler.java:6623)
    clojure.lang.Compiler.eval (Compiler.java:6608)
    clojure.lang.Compiler.eval (Compiler.java:6582)
    clojure.core$eval.invoke (core.clj:2848)
    clojure.main$repl$read_eval_print__6588$fn__6591.invoke (main.clj:264)
    clojure.main$repl$read_eval_print__6588.invoke (main.clj:264)
    clojure.main$repl$fn__6597.invoke (main.clj:282)
    clojure.main$repl.doInvoke (main.clj:281)
    clojure.lang.RestFn.invoke (RestFn.java:1096)
    clojure.tools.nrepl.middleware.interruptible_eval$evaluate$fn__228.invoke (interruptible_eval.clj:51)
    clojure.lang.AFn.applyToHelper (AFn.java:159)
    clojure.lang.AFn.applyTo (AFn.java:151)
    clojure.core$apply.invoke (core.clj:617)
    clojure.core$with_bindings_STAR_.doInvoke (core.clj:1788)
    clojure.lang.RestFn.invoke (RestFn.java:425)
    clojure.tools.nrepl.middleware.interruptible_eval$evaluate.invoke (interruptible_eval.clj:36)
    clojure.tools.nrepl.middleware.interruptible_eval$interruptible_eval$fn__265$fn__268.invoke (interruptible_eval.clj:166)
    clojure.core$comp$fn__4154.invoke (core.clj:2330)
    clojure.tools.nrepl.middleware.interruptible_eval$run_next$fn__258.invoke (interruptible_eval.clj:130)
    clojure.lang.AFn.run (AFn.java:24)
    java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1076)
    java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:569)
    java.lang.Thread.run (Thread.java:856)

I am not sure what the error means, but my guess is that my environment is not set up correctly for dynamic compilation.

I am using:
clojure-android 1.5.1-SNAPSHOT
neko 3.0.0-SNAPSHOT
lein 2.3.1
java 1.6.0_45

Future of dependencies

I love lein droid. Great work, you've made a very fun tool!

Do you have a plan or any ideas for future enhancements of handling dependencies? I'm trying to figure out the best way to create a library that can be used in a standard clojure environment or on android--Using source dependencies seems to get pretty tedious once you start looking at dependencies of dependencies.

Would it be possible to auto-convert all jars in a dependency graph to Dalvik?

Problem creating dex with test project (java.util.zip.ZipException)

Hi, just trying to get started with lein droid and I have an error running 'lein droid build' with the test project.

I get this error:

UNEXPECTED TOP-LEVEL EXCEPTION: java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.(ZipFile.java:127) at java.util.zip.ZipFile.(ZipFile.java:144) at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:206) at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:131) at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:109) at com.android.dx.command.dexer.Main.processOne(Main.java:418) at com.android.dx.command.dexer.Main.processAllFiles(Main.java:329) at com.android.dx.command.dexer.Main.run(Main.java:206) at com.android.dx.command.dexer.Main.main(Main.java:174) at com.android.dx.command.Main.main(Main.java:95) 1 error; aborting

I'm running linux mint debian edition which is basically debian testing.

Missing [neko/neko "1.2.0-SNAPSHOT"]

When I create a new lein-droid project, my project.clj indicates a dependency on [neko/neko "1.2.0-SNAPSHOT"] which is not in Clojars or any other repository.

"lein droid build" fails without it.

failed to lein droid build

Hi,

I'm trying a lein-droid on Windows 7 64-bit.

lein droid new clojuroid kr.ac.ajou.dv.clojuroid :activity MainActivity :target-sdk 10 :app-name ClojureMeetsAndroid

and

lein deps

worked fine.

When I tried lein droid build, it fails...

I used a Cygwin shell, and the error message follows:
Unfortunately, DEBUG=1 did not show me a meaningful message. Just a NullPointerException.

$ DEBUG=1 lein droid build
Leiningen's classpath: ;C:\cygwin\home\yu4up.lein/self-installs/leiningen-2.1.3-standalone.jar
Applying task droid to (build)
Generating R.java...
java.lang.NullPointerException
at clojure.java.io$as_relative_path.invoke(io.clj:403)
at clojure.java.io$file.invoke(io.clj:415)
at clojure.lang.ArrayChunk.reduce(ArrayChunk.java:58)
at clojure.core.protocols$fn__6041.invoke(protocols.clj:98)
at clojure.core.protocols$fn__6005$G__6000__6014.invoke(protocols.clj:19)
at clojure.core.protocols$seq_reduce.invoke(protocols.clj:31)
at clojure.core.protocols$fn__6028.invoke(protocols.clj:48)
at clojure.core.protocols$fn__5979$G__5974__5992.invoke(protocols.clj:13)
at clojure.core$reduce.invoke(core.clj:6177)
at clojure.java.io$file.doInvoke(io.clj:417)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:619)
at leiningen.droid.utils$sdk_binary.invoke(utils.clj:39)
at leiningen.droid.compile$code_gen.invoke(compile.clj:26)
at leiningen.droid.build$build.invoke(build.clj:82)
at leiningen.droid$execute_subtask.invoke(droid.clj:103)
at leiningen.droid$droid.doInvoke(droid.clj:74)
at clojure.lang.RestFn.invoke(RestFn.java:423)
at clojure.lang.Var.invoke(Var.java:419)
at clojure.lang.AFn.applyToHelper(AFn.java:163)
at clojure.lang.Var.applyTo(Var.java:532)
at clojure.core$apply.invoke(core.clj:619)
at leiningen.core.main$resolve_task$fn__1836.doInvoke(main.clj:149)
at clojure.lang.RestFn.applyTo(RestFn.java:139)
at clojure.lang.AFunction$1.doInvoke(AFunction.java:29)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:619)
at leiningen.core.main$apply_task.invoke(main.clj:189)
at leiningen.core.main$resolve_and_apply.invoke(main.clj:193)
at leiningen.core.main$_main$fn__1899.invoke(main.clj:257)
at leiningen.core.main$_main.doInvoke(main.clj:247)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:419)
at clojure.lang.AFn.applyToHelper(AFn.java:163)
at clojure.lang.Var.applyTo(Var.java:532)
at clojure.core$apply.invoke(core.clj:617)
at clojure.main$main_opt.invoke(main.clj:335)
at clojure.main$main.doInvoke(main.clj:440)
at clojure.lang.RestFn.invoke(RestFn.java:457)
at clojure.lang.Var.invoke(Var.java:427)
at clojure.lang.AFn.applyToHelper(AFn.java:172)
at clojure.lang.Var.applyTo(Var.java:532)
at clojure.main.main(main.java:37)

My .profiles.clj

{:user
{:plugins [[lein-droid "0.1.0-preview5"]]}
:android {:sdk-path "C:\Users\yu4up\AppData\Local\Android\android-sdk"}
}

And I didn't edit the project.clj.

Thank you,
Jonguk Kim

apkbuilder was removed from the latest Android Build Tools

I had to move around a few paths on osx, but basically this goes find until generating the apk file.

There is no apkbuilder in recent releases for osx (or is there ?). Unless lein-droid is only windows based.
If not, could you point to the sdk version you are using so I can download it ?

Thanks !

Exception building with preview2

I tried creating a new project following the tutorial using the latest lein-droid, and ran into this:

Compiling neko.ui.menu
Exception in thread "main" java.lang.RuntimeException: Unable to find static field: SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW in interface android.view.MenuItem, compiling:(neko/ui/menu.clj:116:5)
    at clojure.lang.Compiler.analyze(Compiler.java:6380)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$CaseExpr$Parser.parse(Compiler.java:8412)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5708)
    at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:6009)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6548)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6548)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$IfExpr$Parser.parse(Compiler.java:2669)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5708)
    at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5139)
    at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3751)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6558)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6548)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.access$100(Compiler.java:37)
    at clojure.lang.Compiler$DefExpr$Parser.parse(Compiler.java:529)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler.compile1(Compiler.java:7148)
    at clojure.lang.Compiler.compile(Compiler.java:7219)
    at clojure.lang.RT.compile(RT.java:423)
    at clojure.lang.RT.load(RT.java:463)
    at clojure.lang.RT.load(RT.java:436)
    at clojure.core$load$fn__5018.invoke(core.clj:5530)
    at clojure.core$load.doInvoke(core.clj:5529)
    at clojure.lang.RestFn.invoke(RestFn.java:408)
    at clojure.core$load_one.invoke(core.clj:5336)
    at clojure.core$compile$fn__5023.invoke(core.clj:5541)
    at clojure.core$compile.invoke(core.clj:5540)
    at user$eval17.invoke(form-init1458082931118074506.clj:1)
    at clojure.lang.Compiler.eval(Compiler.java:6619)
    at clojure.lang.Compiler.eval(Compiler.java:6609)
    at clojure.lang.Compiler.load(Compiler.java:7064)
    at clojure.lang.Compiler.loadFile(Compiler.java:7020)
    at clojure.main$load_script.invoke(main.clj:299)
    at clojure.main$init_opt.invoke(main.clj:304)
    at clojure.main$initialize.invoke(main.clj:332)
    at clojure.main$null_opt.invoke(main.clj:367)
    at clojure.main$main.doInvoke(main.clj:445)
    at clojure.lang.RestFn.invoke(RestFn.java:421)
    at clojure.lang.Var.invoke(Var.java:419)
    at clojure.lang.AFn.applyToHelper(AFn.java:163)
    at clojure.lang.Var.applyTo(Var.java:532)
    at clojure.main.main(main.java:37)
Caused by: java.lang.RuntimeException: Unable to find static field: SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW in interface android.view.MenuItem
    at clojure.lang.Util.runtimeException(Util.java:219)
    at clojure.lang.Compiler.analyzeSymbol(Compiler.java:6771)
    at clojure.lang.Compiler.analyze(Compiler.java:6343)
    ... 56 more
Compilation failed.

Sadly I have no idea why. My guess is that perhaps there's a dependency on a newer rev of the SDK than I have? I'll try upgrading that, but documenting it here in case others run into it.

lein-droid not compatible with leiningen >= 2.0.0-preview5

I've been looking forward to try out lein-droid now for a while but whenever I run lein droid within a project generated by lein droid new I get the following exception:

% lein droid                                                   
Exception in thread "main" java.io.FileNotFoundException: Could not locate leiningen/droid/utils__init.class or leiningen/droid/utils.clj on classpath: 
   ...

I digged around a bit and found the following message on the leiningen mailing list https://groups.google.com/forum/#!topic/leiningen/eDgfvnh4QTM/discussion. It seems that the fix for technomancy/leiningen#599 broke the kind of middleware usage lein-droid relies on.

Downgrading to leiningen 2.0.0-preview4 fixed the problem for me and I'm happily able to compile and run the generated project on my device.

Clojure on Android seems ... well slow

Firstly I apologize creating this issue I couldn't find a better place for this. I suspect it is an issue but It's easily possible that I messed up something (being a beginner in clojure).

So basically the following code takes about 0.2 msecs on a nexus 4:

(apply vector (apply map vector [[1 2 3][1 2 3][1 2 3]])) ;we want to transpose a matrix

In a normal (desktop) leiningen project the same codes runs literally 100 times faster (0.002 msec).

I can hardly believe that a 1 Ghz ARM processor is 100 times slower than a 3.3 Ghz Core-i5 desktop processor. I know it's apples and oranges but still it's very surprising.

Maybe there is a better way of transposing a matrix but the thing is we measured slow times with other functions too.

We are currently developing a game and we have to do every frame within about 33 msecs to have 30 FPS.

So I guess the execution time of the above code should be one magnitude faster in order to be usable in real-time applications.

EDIT:

We've tried a similar algorithm with java:

public static double[][] transposeMatrix(double [][] m){
double[][] temp = new double[m[0].length][m.length];
for (int i = 0; i < m.length; i++)
for (int j = 0; j < m[0].length; j++)
temp[j][i] = m[i][j];
return temp;
}

with this input: new double[][]{{1,2,3},{4,5,6},{7,8,9}}

this took about 0.02 so it was 10 times faster but the reason for this might be the difference between the too implementations.

So now we're officially confused.

ClassNotFound org.stuff.clojuroid.Application

I ran through your tutorial as you have it, merely changing the API to 13 because I don't have 11 loaded:

 lein droid new clojuroid org.stuff.clojuroid :activity MyActivity :target-sdk 13 :app-name ClojureMeetsAndroid

and got this when trying to run the app:

E AndroidRuntime(1891)        FATAL EXCEPTION: main
E AndroidRuntime(1891)        java.lang.RuntimeException: Unable to instantiate application org.stuff.clojuroid.Application: java.lang.ClassNotFoundException: Didn't find class "org.stuff.clojuroid.Application" on path: /data/app/org.stuff.clojuroid-1.apk
E AndroidRuntime(1891)          at android.app.LoadedApk.makeApplication(LoadedApk.java:504)
E AndroidRuntime(1891)          at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4364)
E AndroidRuntime(1891)          at android.app.ActivityThread.access$1300(ActivityThread.java:141)
E AndroidRuntime(1891)          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1294)
E AndroidRuntime(1891)          at android.os.Handler.dispatchMessage(Handler.java:99)
E AndroidRuntime(1891)          at android.os.Looper.loop(Looper.java:137)
E AndroidRuntime(1891)          at android.app.ActivityThread.main(ActivityThread.java:5041)
E AndroidRuntime(1891)          at java.lang.reflect.Method.invokeNative(Native Method)
E AndroidRuntime(1891)          at java.lang.reflect.Method.invoke(Method.java:511)
E AndroidRuntime(1891)          at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
E AndroidRuntime(1891)          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
E AndroidRuntime(1891)          at dalvik.system.NativeStart.main(Native Method)
E AndroidRuntime(1891)        Caused by: java.lang.ClassNotFoundException: Didn't find class "org.stuff.clojuroid.Application" on path: /data/app/org.stuff.clojuroid-1.apk
E AndroidRuntime(1891)          at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:65)
E AndroidRuntime(1891)          at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
E AndroidRuntime(1891)          at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
E AndroidRuntime(1891)          at android.app.Instrumentation.newApplication(Instrumentation.java:968)
E AndroidRuntime(1891)          at android.app.LoadedApk.makeApplication(LoadedApk.java:499)
E AndroidRuntime(1891)          ... 11 more
W ActivityManager(971)          Force finishing activity org.stuff.clojuroid/.MyActivity

I kind of ran out of energy at that point and didn't track it down any further.

Compilation error on build

I am getting an error when I build my app. Here is the output after running DEBUG=1 lein droid compile:

Leiningen's classpath: :/home/kris/.lein/self-installs/leiningen-2.3.1-standalone.jar
Applying task droid to (compile)
Applying task javac to nil
Running javac with [@/tmp/.leiningen-cmdline2657784603916681583.tmp]
Compiling 2 source files to /home/kris/src/events/target/classes
Applying task compile to nil
All namespaces already AOT compiled.
WARNING: :warn-on-reflection is deprecated; use :global-vars.
Running javac with [@/tmp/.leiningen-cmdline80063343821039418.tmp]
Compiling Clojure files...
Project classpath: (/home/kris/adt-bundle-linux-x86_64-20130522/sdk//tools/support/annotations.jar /home/kris/adt-bundle-linux-x86_64-20130522/sdk/platforms/android-15/android.jar /home/kris/src/events/test /home/kris/src/events/src/clojure /home/kris/src/events/src /home/kris/src/events/dev-resources /home/kris/src/events/resources /home/kris/src/events/target/classes /home/kris/.m2/repository/neko/neko/3.0.0-beta5/neko-3.0.0-beta5.jar /home/kris/.m2/repository/org/clojure-android/clojure/1.5.1-SNAPSHOT/clojure-1.5.1-SNAPSHOT.jar /home/kris/.m2/repository/android/tools.nrepl/0.2.0-bigstack/tools.nrepl-0.2.0-bigstack.jar /home/kris/.m2/repository/org/clojure-android/clojure-complete/0.3.0-SNAPSHOT/clojure-complete-0.3.0-SNAPSHOT.jar)
Build type: debug, dynamic compilation: enabled, remote REPL: enabled.
Applying task javac to nil
Running javac with [@/tmp/.leiningen-cmdline5884353484937350684.tmp]
WARNING: :warn-on-reflection is deprecated; use :global-vars.
Exception in thread "main" java.lang.RuntimeException: Unable to resolve var: o/*nrepl-port* in this context, compiling:(/tmp/form-init4250532848081098912.clj:1:171)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6567)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3624)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6562)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3624)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6562)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5708)
    at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:6009)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5708)
    at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5139)
    at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3751)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6558)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.eval(Compiler.java:6616)
    at clojure.lang.Compiler.eval(Compiler.java:6609)
    at clojure.lang.Compiler.load(Compiler.java:7064)
    at clojure.lang.Compiler.loadFile(Compiler.java:7020)
    at clojure.main$load_script.invoke(main.clj:299)
    at clojure.main$init_opt.invoke(main.clj:304)
    at clojure.main$initialize.invoke(main.clj:332)
    at clojure.main$null_opt.invoke(main.clj:367)
    at clojure.main$main.doInvoke(main.clj:445)
    at clojure.lang.RestFn.invoke(RestFn.java:421)
    at clojure.lang.Var.invoke(Var.java:419)
    at clojure.lang.AFn.applyToHelper(AFn.java:163)
    at clojure.lang.Var.applyTo(Var.java:532)
    at clojure.main.main(main.java:37)
Caused by: java.lang.RuntimeException: Unable to resolve var: o/*nrepl-port* in this context
    at clojure.lang.Util.runtimeException(Util.java:219)
    at clojure.lang.Compiler$TheVarExpr$Parser.parse(Compiler.java:650)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
    ... 34 more
Compilation failed.

java.lang.IllegalArgumentException: No matching clause: droidtest

With the official build at clojars I got error #20 and after cloning here, running lein jar and copying the jar into my leiningen folder the following error comes up:

% lein droid droidtest de.profpatsch.droidtest
java.lang.IllegalArgumentException: No matching clause: droidtest
    at leiningen.droid$execute_subtask.invoke(droid.clj:81)
    at leiningen.droid$droid.doInvoke(droid.clj:74)
    at clojure.lang.RestFn.invoke(RestFn.java:439)
    at clojure.lang.Var.invoke(Var.java:423)
…

Document that nREPL functionality requires using defactivity or calling neko.init/init

I had some difficulty getting the nREPL functionality to work in my project (I was repeatedly getting "SocketException: The transport's socket appears to have lost its connection to the nREPL server" ).

The reason was that I was using an activity created via gen-class, rather than defactivity, and that avoids calling neko.init/init, which starts the nREPL server. This is unlikely to happen when using lein droid new, but it's easy enough when using an existing project via lein droid init. As far as I can tell, this requirement to enable the nREPL server is not documented anywhere, it might be good to add a note to the wiki.

Thanks for the tools!

cooperate with Eclipse/ADT and/or official ant script

If possible I'd like to stick with Google's ant-based build system for Android projects for the moment. Part of the reason is that I also want to use the Eclipse-based Android environment ADT.

The only thing that's keeping me from doing this for now is that Leiningen 2 doesn't copy the dependency jars to /libs anymore the way that Leiningen 1.x. Both Eclipse/ADT and the Android ant-script expect libraries in /libs or some similar folder underneath the project folder.

So if lein-droid had a simple command like lein copy-deps that would be great. If you know another way of sticking with both the official ant script and Eclipse/ADT while using Leiningen that would work, too.

Unable to set signal handlers and VerifyError

Every time I run the REPL, it says

% lein droid repl
Unable to set signal handlers.
REPL-y 0.1.10
Clojure 1.4.0
VerifyError reply/exports$eval65  java.lang.Class.newInstanceImpl (Class.java:-2)
reply.eval-modes.nrepl=> 

From issue #21 (comment) I get that everything is working as it should and this message is displayed every time, yet I thought it is some critical error until I found the post above.

What is the cause of this message about signal handlers? Does it matter to me at all?
If not it would be sensible to give it a Warning: prefix imho.

And with the VerifyError, it looks like I’m thrown to the reply.eval-modes.nrepl namespace. I don’t know if this is normal behavior, since I haven’t been able to get it running yet.

Can't install APK on device (Failure [INSTALL_FAILED_INVALID_APK])

System: Mac OS X 10.7.5 (Intel)

I started the emulator with:
emulator -avd AVD_for_Nexus_4_by_Google -netspeed full -netdelay none -gpu on&

When I do 'lein droid doall', all seems to go through smoothly, but no app gets installed or started.

If I try to manually install the APK, it fails:
adb install ./target/ldroid-debug.apk
1045 KB/s (1951887 bytes in 1.822s)
pkg: /data/local/tmp/ldroid-debug.apk
Failure [INSTALL_FAILED_INVALID_APK]

This seems to be the problem with 'lein droid doall' too, but why? Yesterday was the first time I used lein-droid, and I remember if occasionally working. Today I have been completely out of luck.

Follows a complete output from 'lein droid doall'

DEBUG=1 lein droid doall
Leiningen's classpath: :/Users/zimmd/.lein/self-installs/leiningen-2.1.3-standalone.jar
Applying task droid to (doall)
Generating R.java...
/Users/zimmd/android-sdk-macosx/build-tools/17.0.0/aapt package --auto-add-overlay -f -m -M /Users/zimmd/Documents/clojure/ldroid/AndroidManifest.xml -S /Users/zimmd/Documents/clojure/ldroid/target/res -S /Users/zimmd/Documents/clojure/ldroid/res -I /Users/zimmd/android-sdk-macosx/platforms/android-17/android.jar -J /Users/zimmd/Documents/clojure/ldroid/gen --generate-dependencies

Running javac with [@/var/folders/zt/yq6mcctn71l7l5j0_61nzbym0000gp/T/.leiningen-cmdline6037906155517761448.tmp]
Compiling 1 source files to /Users/zimmd/Documents/clojure/ldroid/target/classes
Compiling Clojure files...
Project classpath: (/Users/zimmd/android-sdk-macosx/tools/support/annotations.jar /Users/zimmd/android-sdk-macosx/platforms/android-17/android.jar /Users/zimmd/Documents/clojure/ldroid/test /Users/zimmd/Documents/clojure/ldroid/src/clojure /Users/zimmd/Documents/clojure/ldroid/dev-resources /Users/zimmd/Documents/clojure/ldroid/resources /Users/zimmd/Documents/clojure/ldroid/target/classes /Users/zimmd/.m2/repository/android/clojure/1.4.0/clojure-1.4.0.jar /Users/zimmd/.m2/repository/neko/neko/2.0.0-beta1/neko-2.0.0-beta1.jar /Users/zimmd/.m2/repository/android/tools.nrepl/0.2.0-bigstack/tools.nrepl-0.2.0-bigstack.jar)
Build type: debug, dynamic compilation: enabled, remote REPL: enabled.
Applying task javac to nil
Running javac with [@/var/folders/zt/yq6mcctn71l7l5j0_61nzbym0000gp/T/.leiningen-cmdline2709143033790898325.tmp]
Compiling clojure.java.browse
Compiling neko.ui.listview
Compiling clojure.data
Compiling clojure.tools.nrepl.middleware.interruptible-eval
Compiling clojure.tools.nrepl.ack
Compiling clojure.tools.nrepl.server
Compiling clojure.tools.nrepl.misc
Compiling neko.init.options
Compiling neko.listeners.adapter-view
Compiling neko.doc
Compiling neko.resource
Compiling clojure.core.protocols
Compiling neko.-utils
Compiling clojure.tools.nrepl.helpers
Compiling clojure.tools.nrepl.cmdline
Compiling clojure.zip
Compiling neko.init
Compiling neko.listeners.text-view
Compiling clojure.java.shell
Compiling neko.activity
Compiling clojure.test
Compiling clojure.test.tap
Compiling clojure.test.junit
Compiling neko.data
Compiling clojure.template
Compiling clojure.walk
Compiling neko.threading
Compiling neko.ui.adapters
Compiling clojure.xml
Compiling neko.listeners.dialog
Compiling clojure.tools.nrepl.bencode
Compiling clojure.java.browse-ui
Compiling neko.find-view
Compiling clojure.string
Compiling neko.notify
Compiling neko.log
Compiling neko.compilation
Compiling neko.ui.mapping
Compiling neko.data.sqlite
Compiling neko.listeners.view
Compiling neko.application
Compiling clojure.reflect
Compiling clojure.set
Compiling neko.ui.traits
Compiling clojure.instant
Compiling neko.debug
Compiling ldroid.main
Compiling clojure.tools.nrepl
Compiling clojure.inspector
Compiling neko.dialog.alert
Compiling clojure.core
Compiling clojure.java.javadoc
Compiling clojure.main
Compiling clojure.tools.nrepl.middleware.session
Compiling clojure.java.io
Compiling neko.context
Compiling clojure.tools.nrepl.transport
Compiling clojure.stacktrace
Compiling clojure.pprint
Compiling neko.ui
Compiling clojure.repl
Compiling clojure.tools.nrepl.middleware.pr-values
Compiling clojure.uuid
Compilation succeeded.
Creating DEX....
/Users/zimmd/android-sdk-macosx/build-tools/17.0.0/dx --dex --no-optimize --output /Users/zimmd/Documents/clojure/ldroid/target/classes.dex /Users/zimmd/Documents/clojure/ldroid/target/classes /Users/zimmd/android-sdk-macosx/tools/support/annotations.jar /Users/zimmd/.m2/repository/android/clojure/1.4.0/clojure-1.4.0.jar /Users/zimmd/.m2/repository/neko/neko/2.0.0-beta1/neko-2.0.0-beta1.jar /Users/zimmd/.m2/repository/android/tools.nrepl/0.2.0-bigstack/tools.nrepl-0.2.0-bigstack.jar

Crunching resources...
/Users/zimmd/android-sdk-macosx/build-tools/17.0.0/aapt crunch -v -S /Users/zimmd/Documents/clojure/ldroid/res -C /Users/zimmd/Documents/clojure/ldroid/target/res
Crunching PNG Files in source dir: /Users/zimmd/Documents/clojure/ldroid/res To destination dir: /Users/zimmd/Documents/clojure/ldroid/target/res
Packaging resources...
/Users/zimmd/android-sdk-macosx/build-tools/17.0.0/aapt package --no-crunch -f --debug-mode --auto-add-overlay -M /Users/zimmd/Documents/clojure/ldroid/AndroidManifest.xml -S /Users/zimmd/Documents/clojure/ldroid/target/res -S /Users/zimmd/Documents/clojure/ldroid/res -A /Users/zimmd/Documents/clojure/ldroid/assets -I /Users/zimmd/android-sdk-macosx/platforms/android-17/android.jar -F /Users/zimmd/Documents/clojure/ldroid/target/ldroid.ap_ --generate-dependencies

Creating APK...
Signing APK...
jarsigner -sigalg MD5withRSA -digestalg SHA1 -keystore /Users/zimmd/.android/debug.keystore -storepass android -keypass android /Users/zimmd/Documents/clojure/ldroid/target/ldroid-debug-unaligned.apk androiddebugkey

Aligning APK...
/Users/zimmd/android-sdk-macosx/tools/zipalign 4 /Users/zimmd/Documents/clojure/ldroid/target/ldroid-debug-unaligned.apk /Users/zimmd/Documents/clojure/ldroid/target/ldroid-debug.apk

/Users/zimmd/android-sdk-macosx/platform-tools/adb devices
List of devices attached emulator-5554 device
Installing APK...
/Users/zimmd/android-sdk-macosx/platform-tools/adb -s emulator-5554 install -r /Users/zimmd/Documents/clojure/ldroid/target/ldroid-debug.apk
1168 KB/s (1951887 bytes in 1.631s) pkg: /data/local/tmp/ldroid-debug.apk Failure [INSTALL_FAILED_INVALID_APK]
Launching APK...
/Users/zimmd/android-sdk-macosx/platform-tools/adb -s emulator-5554 shell am start -n ldroid/.MainActivity
Starting: Intent { cmp=ldroid/.MainActivity } Error type 3 Error: Activity class {ldroid/ldroid.MainActivity} does not exist.
Binding device port 9999 to local port 9999 ...
/Users/zimmd/android-sdk-macosx/platform-tools/adb -s emulator-5554 forward tcp:9999 tcp:9999

Cannot find aapt file.

Going through the tutorial, at the point of excuting lein droid doall it give me the following error:

java.io.IOException: Cannot run program "/home/user/Android/build-tools/android-4.3/aapt": java.io.IOException: error=2, No such file or directory
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:488)
    at leiningen.droid.utils$sh.doInvoke(utils.clj:285)
    at clojure.lang.RestFn.invoke(RestFn.java:2422)
    at leiningen.droid.compile$code_gen.invoke(compile.clj:48)
    at leiningen.droid.build$build.invoke(build.clj:161)
    at leiningen.droid$doall.doInvoke(droid.clj:37)
    at clojure.lang.RestFn.invoke(RestFn.java:410)
    at clojure.lang.AFn.applyToHelper(AFn.java:161)
    at clojure.lang.RestFn.applyTo(RestFn.java:132)
    at clojure.core$apply.invoke(core.clj:619)
    at leiningen.droid$execute_subtask.invoke(droid.clj:124)
    at leiningen.droid$droid.doInvoke(droid.clj:91)
    at clojure.lang.RestFn.invoke(RestFn.java:423)
    at clojure.lang.Var.invoke(Var.java:419)
    at clojure.lang.AFn.applyToHelper(AFn.java:163)
    at clojure.lang.Var.applyTo(Var.java:532)
    at clojure.core$apply.invoke(core.clj:619)
    at leiningen.core.main$resolve_task$fn__1269.doInvoke(main.clj:151)
    at clojure.lang.RestFn.applyTo(RestFn.java:139)
    at clojure.lang.AFunction$1.doInvoke(AFunction.java:29)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at clojure.core$apply.invoke(core.clj:619)
    at leiningen.core.main$apply_task.invoke(main.clj:192)
    at leiningen.core.main$resolve_and_apply.invoke(main.clj:196)
    at leiningen.core.main$_main$fn__1332.invoke(main.clj:265)
    at leiningen.core.main$_main.doInvoke(main.clj:252)
    at clojure.lang.RestFn.invoke(RestFn.java:421)
    at clojure.lang.Var.invoke(Var.java:419)
    at clojure.lang.AFn.applyToHelper(AFn.java:163)
    at clojure.lang.Var.applyTo(Var.java:532)
    at clojure.core$apply.invoke(core.clj:617)
    at clojure.main$main_opt.invoke(main.clj:335)
    at clojure.main$main.doInvoke(main.clj:440)
    at clojure.lang.RestFn.invoke(RestFn.java:457)
    at clojure.lang.Var.invoke(Var.java:427)
    at clojure.lang.AFn.applyToHelper(AFn.java:172)
    at clojure.lang.Var.applyTo(Var.java:532)
    at clojure.main.main(main.java:37)
Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
    at java.lang.UNIXProcess.(UNIXProcess.java:164)
    at java.lang.ProcessImpl.start(ProcessImpl.java:81)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:470)
    ... 37 more

The aapt file is already in the path expecified by the error , but it said that it can't find it.

lein droid compile error (ReaderException: java.lang.RuntimeException: EOF while reading string)

On Win7 x64 with lein 2.1.3 and lein-droid 0.1.0-preview4 after lein droid new clojuroid ..., cd into clojuroid dir. Running lein droid doall, lein droid build or lein droid compile produces the following error:

$ lein droid compile
Exception in thread "main" clojure.lang.LispReader$ReaderException: java.lang.RuntimeException: EOF while reading string
        at clojure.lang.LispReader.read(LispReader.java:215)
        at clojure.core$read.invoke(core.clj:3346)
        at clojure.core$read.invoke(core.clj:3344)
        at clojure.main$eval_opt.invoke(main.clj:300)
        at clojure.main$initialize.invoke(main.clj:321)
        at clojure.main$script_opt.invoke(main.clj:345)
        at clojure.main$main.doInvoke(main.clj:432)
        at clojure.lang.RestFn.invoke(RestFn.java:3894)
        at clojure.lang.Var.invoke(Var.java:527)
        at clojure.lang.AFn.applyToHelper(AFn.java:410)
        at clojure.lang.Var.applyTo(Var.java:532)
        at clojure.main.main(main.java:37)
Caused by: java.lang.RuntimeException: EOF while reading string
        at clojure.lang.Util.runtimeException(Util.java:170)
        at clojure.lang.LispReader$StringReader.invoke(LispReader.java:453)
        at clojure.lang.LispReader.readDelimitedList(LispReader.java:1126)
        at clojure.lang.LispReader$ListReader.invoke(LispReader.java:962)
        at clojure.lang.LispReader.readDelimitedList(LispReader.java:1126)
        at clojure.lang.LispReader$ListReader.invoke(LispReader.java:962)
        at clojure.lang.LispReader.readDelimitedList(LispReader.java:1126)
        at clojure.lang.LispReader$ListReader.invoke(LispReader.java:962)
        at clojure.lang.LispReader.readDelimitedList(LispReader.java:1126)
        at clojure.lang.LispReader$ListReader.invoke(LispReader.java:962)
        at clojure.lang.LispReader.read(LispReader.java:180)
        ... 11 more

lein-droid doesn't use correct directory separators on Windows

Hi,

I get the error mentioned in the subject when doing "lein droid apk":
The path C:\monacljisa\target/monacljisa-debug-unaligned.apk doesn't exist. Abort execution.

Well, there really is no monacljisa-debug-unaligned.apk - how could I get one? ;-)

best

clojure.set class not found when compiling with clojure contrib (with penumbra)

I'm trying to include penumbra in my empty project. I was able to run lein droid all to my device but now after including penumbra (which uses clojure contrib's clojure.set apparently) I cannot get it to compile.
Perhaps penumbra is too outdated and shouldn't be using contrib, but penumbra itself compiles fine so it seems to be an issue with lein-droid and penumbra. Perhaps I should just use lwjgl instead :-\

Thanks for any help!

Below is the trace running lein droid doall

Generating R.java...
Compiling 1 source files
Compiling Clojure files...
Build type: debug, dynamic compilation: enabled, remote REPL: enabled.
Compiling clojure.contrib.generic.math-functions
Compiling clojure.java.browse
Compiling clojure.contrib.cond
Compiling penumbra.opengl.teapot
Jul 24, 2013 8:09:03 PM penumbra.Natives extractNativeLibs
Jul 24, 2013 8:09:03 PM penumbra.Natives extractNativeLibs
Jul 24, 2013 8:09:03 PM penumbra.Natives extractNativeLibs
Compiling clojure.contrib.accumulators.examples
Exception in thread "main" java.lang.ClassNotFoundException: clojure.set, compil
ing:(clojure/contrib/accumulators.clj:121)
        at clojure.lang.Compiler.analyze(Compiler.java:6281)
        at clojure.lang.Compiler.analyze(Compiler.java:6223)
        at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3548)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:6457)
        at clojure.lang.Compiler.analyze(Compiler.java:6262)
        at clojure.lang.Compiler.analyze(Compiler.java:6223)
        at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3548)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:6457)
        at clojure.lang.Compiler.analyze(Compiler.java:6262)
        at clojure.lang.Compiler.analyze(Compiler.java:6223)
        at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5618)
        at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5054)
        at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3674)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:6453)
        at clojure.lang.Compiler.analyze(Compiler.java:6262)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:6443)
        at clojure.lang.Compiler.analyze(Compiler.java:6262)
        at clojure.lang.Compiler.analyze(Compiler.java:6223)
        at clojure.lang.Compiler$HostExpr$Parser.parse(Compiler.java:936)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:6455)
        at clojure.lang.Compiler.analyze(Compiler.java:6262)
        at clojure.lang.Compiler.analyze(Compiler.java:6223)
        at clojure.lang.Compiler.compile1(Compiler.java:7030)
        at clojure.lang.Compiler.compile(Compiler.java:7097)
        at clojure.lang.RT.compile(RT.java:412)
        at clojure.lang.RT.load(RT.java:452)
        at clojure.lang.RT.load(RT.java:425)
        at clojure.core$load$fn__4890.invoke(core.clj:5415)
        at clojure.core$load.doInvoke(core.clj:5414)
        at clojure.lang.RestFn.invoke(RestFn.java:408)
        at clojure.core$load_one.invoke(core.clj:5227)
        at clojure.core$load_lib.doInvoke(core.clj:5264)
        at clojure.lang.RestFn.applyTo(RestFn.java:142)
        at clojure.core$apply.invoke(core.clj:603)
        at clojure.core$load_libs.doInvoke(core.clj:5298)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.core$apply.invoke(core.clj:605)
        at clojure.core$use.doInvoke(core.clj:5392)
        at clojure.lang.RestFn.invoke(RestFn.java:408)
        at clojure.contrib.accumulators.examples$loading__4784__auto__.invoke(ex
amples.clj:9)
        at clojure.lang.AFn.applyToHelper(AFn.java:159)
        at clojure.lang.AFn.applyTo(AFn.java:151)
        at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:3382)
        at clojure.lang.Compiler.compile1(Compiler.java:7035)
        at clojure.lang.Compiler.compile1(Compiler.java:7025)
        at clojure.lang.Compiler.compile(Compiler.java:7097)
        at clojure.lang.RT.compile(RT.java:412)
        at clojure.lang.RT.load(RT.java:452)
        at clojure.lang.RT.load(RT.java:425)
        at clojure.core$load$fn__4890.invoke(core.clj:5415)
        at clojure.core$load.doInvoke(core.clj:5414)
        at clojure.lang.RestFn.invoke(RestFn.java:408)
        at clojure.core$load_one.invoke(core.clj:5227)
        at clojure.core$compile$fn__4895.invoke(core.clj:5426)
        at clojure.core$compile.invoke(core.clj:5425)
        at user$eval11.invoke(NO_SOURCE_FILE:1)
        at clojure.lang.Compiler.eval(Compiler.java:6511)
        at clojure.lang.Compiler.eval(Compiler.java:6501)
        at clojure.lang.Compiler.eval(Compiler.java:6477)
        at clojure.core$eval.invoke(core.clj:2797)
        at clojure.main$eval_opt.invoke(main.clj:302)
        at clojure.main$initialize.invoke(main.clj:321)
        at clojure.main$null_opt.invoke(main.clj:354)
        at clojure.main$main.doInvoke(main.clj:432)
        at clojure.lang.RestFn.invoke(RestFn.java:421)
        at clojure.lang.Var.invoke(Var.java:419)
        at clojure.lang.AFn.applyToHelper(AFn.java:163)
        at clojure.lang.Var.applyTo(Var.java:532)
        at clojure.main.main(main.java:37)
Caused by: java.lang.ClassNotFoundException: clojure.set
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at clojure.lang.DynamicClassLoader.findClass(DynamicClassLoader.java:65)

        at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:266)
        at clojure.lang.RT.classForName(RT.java:2086)
        at clojure.lang.Compiler$HostExpr.maybeClass(Compiler.java:957)
        at clojure.lang.Compiler$HostExpr.access$400(Compiler.java:736)
        at clojure.lang.Compiler.analyzeSymbol(Compiler.java:6658)
        at clojure.lang.Compiler.analyze(Compiler.java:6244)
        ... 68 more
Compilation failed.

-preview2 breaks REPL

Switching the lein-droid version back and forth between -preview2 and -preview1 reproducibly breaks the REPL when using -preview2 with the following error message on "lein droid repl":

SocketException The transport's socket appears to have lost its connection to the nREPL server
clojure.tools.nrepl.transport/bencode/fn--1550/fn--1551 (transport.clj:95)
clojure.tools.nrepl.transport/bencode/fn--1550 (transport.clj:95)
clojure.tools.nrepl.transport/fn-transport/fn--1524 (transport.clj:42)
clojure.core/binding-conveyor-fn/fn--3989 (core.clj:1819)
java.util.concurrent.FutureTask$Sync.innerRun (FutureTask.java:334)
java.util.concurrent.FutureTask.run (FutureTask.java:166)
java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1145)
java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:615)
java.lang.Thread.run (Thread.java:722)
Bye for now!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.