Hi all:
I'm having with the B4XDrawer sample the same issue others have had:
Error occurred on line: 217 (B4XDrawer)
I've searched the forum and I've found several threads with the same issues, and I've tested with no success the described solutions
- Redownload AppCompact 4, which include the jettified library.
- Re-jettify the libraries
- Delete AppCompat.androidx.aar and jetify again.
- There's no AppCompat library in internal libraries folder.
- Delete jetifier.map from the additional libraries folder and run jetifier again
The funny thing is I'm making a skeleton app reusing the Drawer. I had a couple activities working, and they still works. But yesterday I added another activity, and I get the error just in the new ones.
Main, PartesTrabajo, ChecklistNSN works.
CVEOrange and Test (added later): error.
Attached a small project with the error.
Thanks
I'm having with the B4XDrawer sample the same issue others have had:
Error occurred on line: 217 (B4XDrawer)
B4X:
Public Sub getCenterPanel As B4XView
Return mCenterPanel 'Line 217
End Sub
I've searched the forum and I've found several threads with the same issues, and I've tested with no success the described solutions
- Redownload AppCompact 4, which include the jettified library.
- Re-jettify the libraries
- Delete AppCompat.androidx.aar and jetify again.
- There's no AppCompat library in internal libraries folder.
- Delete jetifier.map from the additional libraries folder and run jetifier again
The funny thing is I'm making a skeleton app reusing the Drawer. I had a couple activities working, and they still works. But yesterday I added another activity, and I get the error just in the new ones.
Main, PartesTrabajo, ChecklistNSN works.
CVEOrange and Test (added later): error.
Attached a small project with the error.
Thanks
--------- beginning of system
Service started in the background. Trying to start again in foreground mode.
Copying updated assets files (11)
*** Service (starter) Create ***
** Service (starter) Start **
Service started in foreground mode.
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
Main
Partes de Trabajo
** Activity (main) Pause, UserClosed = false **
** Activity (partestrabajo) Create, isFirst = true **
Error occurred on line: 228 (B4XDrawer)
java.lang.RuntimeException: java.lang.ClassCastException: com.semi.gest.partestrabajo cannot be cast to androidx.appcompat.app.AppCompatActivity
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:170)
at anywheresoftware.b4a.objects.PanelWrapper.LoadLayout(PanelWrapper.java:134)
at anywheresoftware.b4a.objects.B4XViewWrapper.LoadLayout(B4XViewWrapper.java:293)
at com.semi.gest.drawer._initialize(drawer.java:75)
at com.semi.gest.partestrabajo._activity_create(partestrabajo.java:357)
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 com.semi.gest.partestrabajo.afterFirstLayout(partestrabajo.java:104)
at com.semi.gest.partestrabajo.access$000(partestrabajo.java:17)
at com.semi.gest.partestrabajo$WaitForLayout.run(partestrabajo.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:216)
at android.app.ActivityThread.main(ActivityThread.java:7266)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:975)
Caused by: java.lang.ClassCastException: com.semi.gest.partestrabajo cannot be cast to androidx.appcompat.app.AppCompatActivity
at de.amberhome.objects.appcompat.ACToolBarWrapper.DesignerCreateView(ACToolBarWrapper.java:119)
at anywheresoftware.b4a.objects.CustomViewWrapper.AfterDesignerScript(CustomViewWrapper.java:70)
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:162)
... 20 more
** Activity (partestrabajo) Resume **
Service started in the background. Trying to start again in foreground mode.
Copying updated assets files (11)
*** Service (starter) Create ***
** Service (starter) Start **
Service started in foreground mode.
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
Main
Partes de Trabajo
** Activity (main) Pause, UserClosed = false **
** Activity (partestrabajo) Create, isFirst = true **
Error occurred on line: 228 (B4XDrawer)
java.lang.RuntimeException: java.lang.ClassCastException: com.semi.gest.partestrabajo cannot be cast to androidx.appcompat.app.AppCompatActivity
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:170)
at anywheresoftware.b4a.objects.PanelWrapper.LoadLayout(PanelWrapper.java:134)
at anywheresoftware.b4a.objects.B4XViewWrapper.LoadLayout(B4XViewWrapper.java:293)
at com.semi.gest.drawer._initialize(drawer.java:75)
at com.semi.gest.partestrabajo._activity_create(partestrabajo.java:357)
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 com.semi.gest.partestrabajo.afterFirstLayout(partestrabajo.java:104)
at com.semi.gest.partestrabajo.access$000(partestrabajo.java:17)
at com.semi.gest.partestrabajo$WaitForLayout.run(partestrabajo.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:216)
at android.app.ActivityThread.main(ActivityThread.java:7266)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:975)
Caused by: java.lang.ClassCastException: com.semi.gest.partestrabajo cannot be cast to androidx.appcompat.app.AppCompatActivity
at de.amberhome.objects.appcompat.ACToolBarWrapper.DesignerCreateView(ACToolBarWrapper.java:119)
at anywheresoftware.b4a.objects.CustomViewWrapper.AfterDesignerScript(CustomViewWrapper.java:70)
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:162)
... 20 more
** Activity (partestrabajo) Resume **
B4A Versión: 9.80
Java Versión: 8
Parseando código. (0.16s)
Building folders structure. (0.25s)
Compilando código. (1.45s)
Compilado códigos de diseños. (0.05s)
Organizando librerías. (0.04s)
(AndroidX SDK)
Generando el fichero R. (1.72s)
Compilando el código del motor de depuración. (11.77s)
Compilando el código Java generado. (14.03s)
Convirtiendo byte code a dex optimizado. (26.14s)
Falló el dexer optimizado. Cambiando al dexer estandard.
Empaquetando ficheros. (8.22s)
Copiando los recursos de librerias (0.42s)
Found 8 resource files.
Firmando ficheros de paquete (clave privada) (12.34s)
ZipAlign file. (0.22s)
Instalando archivo al dispositivo. (7.86s)
Device serial: 520062cdb86cc439
Completado con éxito
Java Versión: 8
Parseando código. (0.16s)
Building folders structure. (0.25s)
Compilando código. (1.45s)
Compilado códigos de diseños. (0.05s)
Organizando librerías. (0.04s)
(AndroidX SDK)
Generando el fichero R. (1.72s)
Compilando el código del motor de depuración. (11.77s)
Compilando el código Java generado. (14.03s)
Convirtiendo byte code a dex optimizado. (26.14s)
Falló el dexer optimizado. Cambiando al dexer estandard.
Empaquetando ficheros. (8.22s)
Copiando los recursos de librerias (0.42s)
Found 8 resource files.
Firmando ficheros de paquete (clave privada) (12.34s)
ZipAlign file. (0.22s)
Instalando archivo al dispositivo. (7.86s)
Device serial: 520062cdb86cc439
Completado con éxito