Android Question Debugger and homescreen widgets?

corwin42

Expert
Licensed User
After I removed all threading library calls in one of my bigger projects and changed it to resumable subs (one of the best features of B4X now) I wanted to try the debugger with it.

If I try to run my app in debug mode I get the following error, when it tries to start the homescreen widget service:
*** Service (widget4x1) Create ***
Error occurred on line: 19 (Widget4x1)
java.io.FileNotFoundException: l4x1.bal
at android.content.res.AssetManager.openAsset(Native Method)
at android.content.res.AssetManager.open(AssetManager.java:347)
at android.content.res.AssetManager.open(AssetManager.java:321)
at anywheresoftware.b4a.objects.RemoteViewsWrapper.createRemoteViews(RemoteViewsWrapper.java:39)
at de.amberhome.weather2.widget4x1._service_create(widget4x1.java:1046)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:735)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:357)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:260)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:171)
at de.amberhome.weather2.widget4x1.onCreate(widget4x1.java:56)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:3216)
at android.app.ActivityThread.-wrap5(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1586)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6186)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
** Service (widget4x1) Start **
Package: com.teslacoilsw.launcher

Line 19 is the ConfigureHomeWidget call:
B4X:
Sub Service_Create
    rv = ConfigureHomeWidget("l4x1", "rv", 0, "AHWeather 4x1", False)
End Sub

Is there a problem using a homescreen widget together with the debugger? Can the widgetcode be excluded from debugging? I guess #ExcludeFromDebugger only affects the legacy debugger.
 
Top