I Try to run the example of digital clock as provided by
www.b4x.com
See b4aDigitalClock.b4a
When layout is loaded I get this error:
Logger verbunden mit: rockchip R1 PLUS
--------- beginning of main
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
Error occurred on line: 30 (Main)
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:170)
at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
at JHS.DigitalClock.main._activity_create(main.java:384)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at JHS.DigitalClock.main.afterFirstLayout(main.java:104)
at JHS.DigitalClock.main.access$000(main.java:17)
at JHS.DigitalClock.main$WaitForLayout.run(main.java:82)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6718)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.objects.CustomViewWrapper.AfterDesignerScript(CustomViewWrapper.java:64)
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:162)
... 18 more
Caused by: java.lang.RuntimeException: Font asset not found digital.ttf
at android.graphics.Typeface.createFromAsset(Typeface.java:839)
at com.example.damian.digitalclock.MyView.<init>(MyView.java:51)
at digitalclockwrapper.digitalclockWrapper._initialize(digitalclockWrapper.java:49)
... 21 more
** Activity (main) Resume **
Digital Clock
A simple wrap for this Github project Sure you will figure it out. Posting: 1. B4A sample project 2. B4A library files (jar and xml - copy them to your additional library folder 3. The java code (amended project and wrapper) - change it to your licking. Touch the clock to change the colors...
See b4aDigitalClock.b4a
When layout is loaded I get this error:
Logger verbunden mit: rockchip R1 PLUS
--------- beginning of main
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
Error occurred on line: 30 (Main)
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:170)
at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
at JHS.DigitalClock.main._activity_create(main.java:384)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at JHS.DigitalClock.main.afterFirstLayout(main.java:104)
at JHS.DigitalClock.main.access$000(main.java:17)
at JHS.DigitalClock.main$WaitForLayout.run(main.java:82)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6718)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.objects.CustomViewWrapper.AfterDesignerScript(CustomViewWrapper.java:64)
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:162)
... 18 more
Caused by: java.lang.RuntimeException: Font asset not found digital.ttf
at android.graphics.Typeface.createFromAsset(Typeface.java:839)
at com.example.damian.digitalclock.MyView.<init>(MyView.java:51)
at digitalclockwrapper.digitalclockWrapper._initialize(digitalclockWrapper.java:49)
... 21 more
** Activity (main) Resume **