How to create a simple GUI project (Hello world) for Android on Clojure?

I am new to Java / Netbeans, but I want to try something on Android. I choose Clojure, but the beginning is not so simple. I set the mode for Netbeans and Clojure and can run simple swing applications.

I found https://github.com/remvee/clojurehelloandroid , but I can’t translate it into a NetBeans solution, I don’t even know how to specify if for Android (Dalvik).

(ns us.riddell.TestProject (:gen-class :extends android.app.Activity :exposes-methods {onCreate superOnCreate})) 

Where is android.app.Activity from coming / how to install / add it?

And it looks like working with a graphical interface in a Dalvik virtual machine.

I really like the NetBeans Clojure GUI Hello World for Android :)

Thanks.

+6
source share
2 answers

Here you have a complete tutorial with a link to the GitHub project. On this site you have a couple of articles about working with Clojure on Android (they even release Clojure REPL for it). Nevertheless, keep in mind that working with Clojure is that Android is not at all smooth, there are many problems with the Dalvik VM and functional aproach.

I don’t know if you can work from Eclipse, given that the plugin is very simple and complains if you do not have .java activity, for example. But you can do it for sure by working with adb from the shell and with emacs. Being what I mentioned emacs, here is a very simple blog

+5
source

I'm not sure if Netbeans supports Android. I think you can go to the eclipse. you can install eclipse and then android AVD.

How to set up eclipse for Android development

Thanks Deepak

+1
source

Source: https://habr.com/ru/post/889378/


All Articles