I've just now tried to get an android activity to run, however when
executing the application ("hello world", really) I get the following
error:
------------------------------------------------------------------------------------
I/ActivityManager(   59): Starting activity: Intent
{ act=android.intent.action.MAIN
cat=[android.intent.category.LAUNCHER] flg=0x10200000
cmp=tk.clojure/.core }
I/ActivityManager(   59): Start proc tk.clojure for activity
tk.clojure/.core: pid=307 uid=10031 gids={1015}
I/global  (  307): Default buffer size used in BufferedReader
constructor. It would be better to be explicit if an 8k-char buffer is
required.
D/dalvikvm(  307): GC_FOR_MALLOC freed 5960 objects / 281936 bytes in
86ms
D/dalvikvm(  307): GC_FOR_MALLOC freed 8151 objects / 362960 bytes in
72ms
D/dalvikvm(  307): GC_FOR_MALLOC freed 8754 objects / 393960 bytes in
73ms
I/dalvikvm(  307): Could not find method
java.beans.Introspector.getBeanInfo, referenced from method
clojure.core$bean.invoke
W/dalvikvm(  307): VFY: unable to resolve static method 15023: Ljava/
beans/Introspector;.getBeanInfo (Ljava/lang/Class;)Ljava/beans/
BeanInfo;
D/dalvikvm(  307): VFY: replacing opcode 0x71 at 0x0044
D/dalvikvm(  307): VFY: dead code 0x0047-012c in Lclojure/core
$bean;.invoke (Ljava/lang/Object;)Ljava/lang/Object;
D/dalvikvm(  307): GC_FOR_MALLOC freed 9136 objects / 387744 bytes in
74ms
D/dalvikvm(  307): GC_FOR_MALLOC freed 11975 objects / 465912 bytes in
84ms
D/dalvikvm(  307): GC_FOR_MALLOC freed 11467 objects / 506384 bytes in
81ms
D/dalvikvm(  307): GC_FOR_MALLOC freed 12562 objects / 507344 bytes in
87ms
W/dalvikvm(  307): Exception Ljava/lang/NullPointerException; thrown
during Lclojure/core__init;.<clinit>
W/dalvikvm(  307): Exception Ljava/lang/ExceptionInInitializerError;
thrown during Lclojure/lang/RT;.<clinit>
W/dalvikvm(  307): Exception Ljava/lang/ExceptionInInitializerError;
thrown during Ltk/clojure/core;.<clinit>
W/dalvikvm(  307): Class init failed in newInstance call (Ltk/clojure/
core;)
D/AndroidRuntime(  307): Shutting down VM
W/dalvikvm(  307): threadid=1: thread exiting with uncaught exception
(group=0x4001d800)
E/AndroidRuntime(  307): FATAL EXCEPTION: main
E/AndroidRuntime(  307): java.lang.ExceptionInInitializerError
E/AndroidRuntime(  307):        at
java.lang.Class.newInstanceImpl(Native Method)
E/AndroidRuntime(  307):        at
java.lang.Class.newInstance(Class.java:1429)
E/AndroidRuntime(  307):        at
android.app.Instrumentation.newActivity(Instrumentation.java:1021)
E/AndroidRuntime(  307):        at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2577)
E/AndroidRuntime(  307):        at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2679)
E/AndroidRuntime(  307):        at android.app.ActivityThread.access
$2300(ActivityThread.java:125)
E/AndroidRuntime(  307):        at android.app.ActivityThread
$H.handleMessage(ActivityThread.java:2033)
E/AndroidRuntime(  307):        at
android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(  307):        at android.os.Looper.loop(Looper.java:
123)
E/AndroidRuntime(  307):        at
android.app.ActivityThread.main(ActivityThread.java:4627)
E/AndroidRuntime(  307):        at
java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(  307):        at
java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime(  307):        at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:868)
E/AndroidRuntime(  307):        at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
E/AndroidRuntime(  307):        at
dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(  307): Caused by:
java.lang.ExceptionInInitializerError
E/AndroidRuntime(  307):        at
clojure.lang.Namespace.<init>(Namespace.java:34)
E/AndroidRuntime(  307):        at
clojure.lang.Namespace.findOrCreate(Namespace.java:173)
E/AndroidRuntime(  307):        at
clojure.lang.Var.internPrivate(Var.java:94)
E/AndroidRuntime(  307):        at tk.clojure.core.<clinit>(Unknown
Source)
E/AndroidRuntime(  307):        ... 15 more
E/AndroidRuntime(  307): Caused by:
java.lang.ExceptionInInitializerError
E/AndroidRuntime(  307):        at java.lang.Class.classForName(Native
Method)
E/AndroidRuntime(  307):        at java.lang.Class.forName(Class.java:
235)
E/AndroidRuntime(  307):        at
clojure.lang.RT.loadClassForName(RT.java:1569)
E/AndroidRuntime(  307):        at clojure.lang.RT.load(RT.java:398)
E/AndroidRuntime(  307):        at clojure.lang.RT.load(RT.java:380)
E/AndroidRuntime(  307):        at clojure.lang.RT.doInit(RT.java:415)
E/AndroidRuntime(  307):        at clojure.lang.RT.<clinit>(RT.java:
301)
E/AndroidRuntime(  307):        ... 19 more
E/AndroidRuntime(  307): Caused by: java.lang.NullPointerException
E/AndroidRuntime(  307):        at
java.util.Properties.load(Properties.java:290)
E/AndroidRuntime(  307):        at clojure.core
$fn__5418.invoke(core.clj:5444)
E/AndroidRuntime(  307):        at clojure.core__init.load(Unknown
Source)
E/AndroidRuntime(  307):        at clojure.core__init.<clinit>(Unknown
Source)
E/AndroidRuntime(  307):        ... 26 more
W/ActivityManager(   59):   Force finishing activity tk.clojure/.core
W/ActivityManager(   59): Activity pause timeout for
HistoryRecord{43f1b9f8 tk.clojure/.core}
W/InputManagerService(   59): Window already focused, ignoring focus
gain of: com.android.internal.view.IInputMethodClient$Stub
$pr...@43de0078
I/Process (  307): Sending signal. PID: 307 SIG: 9
I/ActivityManager(   59): Process tk.clojure (pid 307) has died.
W/ActivityManager(   59): Activity destroy timeout for
HistoryRecord{43f1b9f8 tk.clojure/.core}
------------------------------------------------------------------------------------
It seems clojure depends on java.beans.Introspector.getBeanInfo, which
is not part of the android java API. Anyone else experience this
problem (running on clojure-1.2.0-master)?


The app which causes this:
------------------------------------------------------------------------------------
(ns tk.clojure.core
  (:gen-class
   :extends android.app.Activity
   :exposes-methods {onCreate superOnCreate}))

(defn -onCreate [this #^android.os.Bundle bundle]
  (.superOnCreate this bundle)
  (let [tv (android.widget.TextView. this)]
    (.setText tv "Hello World")
    (.setContentView this tv)))
------------------------------------------------------------------------------------

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to