clojure-android / lein-droid

A Leiningen plugin for building Clojure/Android projects
Eclipse Public License 1.0
645 stars 56 forks source link

minimal android app crashes unexpectedly on froyo/gingerbread (samsung s5360 armv6) #84

Closed jimpil closed 10 years ago

jimpil commented 10 years ago

Hi there,

First of all thanks for all your great work which greatly simplifies android development with clojure! I do have a couple of questions though, if you don't mind...

Basically last night I followed the tutorial and created a sample project...I used all the latest versions with target-sdk = "19" at first. I tried it on my partner's phone which uses API level 18 (JELLY_BEAN_MR2). The app installed and run just fine with a repl connection and everything...

This morning my partner went to work and as you would expect, she took her phone with her...Now, I do have an android phone which his quite old and restrained. Some old models run froyo (8) but mine runs gingerbread (9). So I went into the manifest and added:

<uses-sdk android:minSdkVersion="8" 
          android:targetSdkVersion="19" />

I am not using any APIs (yet) so it compiled and installed just fine...However, the application cannot be launched. It crashes after 12-14 seconds...I thought that maybe Clojure is just to heavy for such a device but then I remember that Daniel's Clojure REPL works as expected on my device! Weird stuff yes? This is my major problem as I cannot work if my partner is not here... Any ideas?

My second confusion has to do with this tutorial : https://github.com/krisc/events/blob/master/tutorial.md

It implies that you can do interactive ui development and explains how to do it in emacs...if I understood correctly evaluating the ns form reloads the entire namespace? IN regular clojure, I use "load-file" to reload an entire file...however this doesn't work for android development...If i am not using emacs how can I achieve interactive development? Is it just a matter of copy/pasting expressions on my terminal?

Many thanks in advance, Jim

ps: I am on JDK 7 u49

alexander-yakushev commented 10 years ago

Hello Dimitrios,

Since version 3, Neko stopped supporting Android versions older than ICS (4.0). Neko doesn't use support libraries for older versions because indeed, older devices don't have enough processing power and memory to run Clojure applications with satisfactory performance.

As for your second question, it depends what programming environment you use for development. In case of plain terminal REPL, copy/pasting is the only way to go. Although you can connect to a remote REPL from many editors/IDEs, such as Emacs, Vim and Eclipse: https://github.com/clojure-android/lein-droid/wiki/Tutorial#wiki-repl-clients

jimpil commented 10 years ago

Right, ok I see...thanks for prompt reply as well :)