Android Question B4XViewWrapper.getColor Error

hanyelmehy

Active Member
Licensed User
Longtime User
on some devices i get this error
B4X:
java.lang.NoSuchFieldException:
  at java.lang.Class.getDeclaredField (Native Method)
  at anywheresoftware.b4a.objects.B4XViewWrapper.getColor (B4XViewWrapper.java:388)
  at teachers.edraak.onlineexam.customlistview._designercreateview (customlistview.java:342)
  at java.lang.reflect.Method.invoke (Native Method)
  at anywheresoftware.b4a.BA.raiseEvent2 (BA.java:196)
  at anywheresoftware.b4a.objects.CustomViewWrapper.AfterDesignerScript (CustomViewWrapper.java:67)
  at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout (LayoutBuilder.java:162)
  at anywheresoftware.b4a.objects.PanelWrapper.LoadLayout (PanelWrapper.java:134)
  at teachers.edraak.onlineexam.showexam._adjustlayout (showexam.java:547)
  at teachers.edraak.onlineexam.showexam._activity_create (showexam.java:450)
  at java.lang.reflect.Method.invoke (Native Method)
  at anywheresoftware.b4a.BA.raiseEvent2 (BA.java:196)
  at teachers.edraak.onlineexam.showexam.afterFirstLayout (showexam.java:104)
  at teachers.edraak.onlineexam.showexam.access$000 (showexam.java:17)
  at teachers.edraak.onlineexam.showexam$WaitForLayout.run (showexam.java:82)
  at android.os.Handler.handleCallback (Handler.java:888)
  at android.os.Handler.dispatchMessage (Handler.java:100)
  at android.os.Looper.loop (Looper.java:213)
  at android.app.ActivityThread.main (ActivityThread.java:8178)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:513)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1101)

Notes :
-target sdk 29
-i read some recommendation on this forum to lower target sdk to 28 ,which not available now (API level 29 Required for new apps)
 

hanyelmehy

Active Member
Licensed User
Longtime User
I believe that this crash happened with an app compiled with an older version of B4A. Maybe an older version of your app.
it's a new app ,i am sure that i build it with last B4A Ver 10.2
the error in not shown on all devices ,most of device that show this error (HUAWEI)
 
Upvote 0
Top