Android Question [Resolved] Problem with NiceSpinner

stingrae

Member
Licensed User
Longtime User
Hi guys,

I have a simple screen and on in it I have a CustomListView which is working nicely.

Now I want to add a drop down to it, so I found the NiceSpinner control and am trying to get that working. The problem is, that whenever I add that to my screen, it crashes. All I have to do is go in to the designer and add it to the screen (generate the members or not, same result) ... and then when I run it again and bring up the screen, it crashes and the B4A source code editor opens in the CustomListView code.

Here is the error in the log:
B4X:
Error occurred on line: 59 (CustomListView)
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 stingrae.arnold.main._btnbushomemembernew_click(main.java:794)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:738)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:360)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:260)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:175)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:171)
    at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80)
    at android.view.View.performClick(View.java:5214)
    at android.view.View$PerformClick.run(View.java:20978)
    at android.os.Handler.handleCallback(Handler.java:739)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:145)
    at android.app.ActivityThread.main(ActivityThread.java:6134)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
Caused by: java.lang.reflect.InvocationTargetException
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at anywheresoftware.b4a.objects.CustomViewWrapper.AfterDesignerScript(CustomViewWrapper.java:64)
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:162)
    ... 23 more
Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x0
    at android.content.res.Resources.getValue(Resources.java:2358)
    at android.content.res.Resources.getDimensionPixelSize(Resources.java:1755)
    at main.java.org.angmarch.views.NiceSpinner.init(NiceSpinner.java:127)
    at main.java.org.angmarch.views.NiceSpinner.<init>(NiceSpinner.java:72)
    at nicespinnerwrapper.niceSpinnerWrapper._initialize(niceSpinnerWrapper.java:105)
    ... 27 more

Any ideas?

Thanks in advance.
 

Johan Schoeman

Expert
Licensed User
Longtime User
Hi guys,

I have a simple screen and on in it I have a CustomListView which is working nicely.

Now I want to add a drop down to it, so I found the NiceSpinner control and am trying to get that working. The problem is, that whenever I add that to my screen, it crashes. All I have to do is go in to the designer and add it to the screen (generate the members or not, same result) ... and then when I run it again and bring up the screen, it crashes and the B4A source code editor opens in the CustomListView code.

Here is the error in the log:
B4X:
Error occurred on line: 59 (CustomListView)
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 stingrae.arnold.main._btnbushomemembernew_click(main.java:794)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:738)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:360)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:260)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:175)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:171)
    at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80)
    at android.view.View.performClick(View.java:5214)
    at android.view.View$PerformClick.run(View.java:20978)
    at android.os.Handler.handleCallback(Handler.java:739)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:145)
    at android.app.ActivityThread.main(ActivityThread.java:6134)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
Caused by: java.lang.reflect.InvocationTargetException
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at anywheresoftware.b4a.objects.CustomViewWrapper.AfterDesignerScript(CustomViewWrapper.java:64)
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:162)
    ... 23 more
Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x0
    at android.content.res.Resources.getValue(Resources.java:2358)
    at android.content.res.Resources.getDimensionPixelSize(Resources.java:1755)
    at main.java.org.angmarch.views.NiceSpinner.init(NiceSpinner.java:127)
    at main.java.org.angmarch.views.NiceSpinner.<init>(NiceSpinner.java:72)
    at nicespinnerwrapper.niceSpinnerWrapper._initialize(niceSpinnerWrapper.java:105)
    ... 27 more

Any ideas?

Thanks in advance.


Nicespinner has some resources in the /Objects/res folder of the original B4A project. Make sure you have added them to your project and that the files in the /Obejcts/res folders are set to "read only".
 
Upvote 0
Top