Android Question XUI Views Compile Error [b4xfloattextfield.java]

Sorin Pohontu

Member
Licensed User
Longtime User
Hi,

I'm trying to use XUI Views in one project and I encounter an error: as soon as I add XUI Views in Modules, when I compile I have this error:

B4X:
B4A line: 210
End Sub
javac 1.8.0_111
b4xfloattextfield.java:699: error: package anywheresoftware.b4a.shell does not exist
    anywheresoftware.b4a.shell.Shell s = anywheresoftware.b4a.shell.Shell.INSTANCE;

I have tried to compile B4A example from XUI Views Example.zip and it's working.

B4A Version 9.30

Here are the libraries:
B4X:
BLE: 1.38
Core: 9.20
JavaObject: 2.05
Reflection: 2.50
RuntimePermissions: 1.10
TabStripViewPager: 1.20
XUI Views: 2.13

Any hints ?
 

Sorin Pohontu

Member
Licensed User
Longtime User
Seems like the error is generated with conditional symbol DEBUG from B4XFloatTextField.bas

B4X:
#if DEBUG
#if JAVA
public void RemoveWarning() throws Exception{
    anywheresoftware.b4a.shell.Shell s = anywheresoftware.b4a.shell.Shell.INSTANCE;
    java.lang.reflect.Field f = s.getClass().getDeclaredField("errorMessagesForSyncEvents");
    f.setAccessible(true);
    java.util.HashSet<String> h = (java.util.HashSet<String>)f.get(s);
    if (h == null) {
        h = new java.util.HashSet<String>();
        f.set(s, h);
    }
    h.add("tf_focuschanged");
}
#End If
#End If

Tried same flag in B4A example and I have the same error.
 
Upvote 0

Sorin Pohontu

Member
Licensed User
Longtime User
Hi Erel,

Yes. You can replicate this on project from demo archive: XUI Views Example.zip\B4A.
Build Configuration -> Conditional symbols -> Add "Debug"

After that, try to recompile the project.
 
Upvote 0
Top