Android Question First page app that doesn't start

amorosik

Expert
Licensed User
I'm trying to recompile a project that was working fine until last month
Now, the compilation is successful, the installation starts correctly, when the first page of the app should be displayed, it plants, returning the message indicated below on the log window
Being the only change that has been made, I assume it is related to an Android SDK update, but I'm not sure
How can I understand the reason for the app not starting?

Log Windows:
Logger connesso a:  BullittGroupLimited S60
--------- beginning of main
*** Service (starter) Create ***
***************************************************************
2021-06-07 10:25:33 031 - *********************************************
2021-06-07 10:25:33 034 - Starter.Service_Create
** Service (starter) Start **
2021-06-07 10:25:33 182 - Starter.Service_Start
** Activity (main) Create, isFirst = true **
=======================================================
2021-06-07 10:25:33 343 - Main.Activity_Create FirstTime=true
2021-06-07 10:25:33 391 - B4XMainpage.B4XPage_Created
Error occurred on line: 58 (B4XMainPage)
java.lang.reflect.InvocationTargetException
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.keywords.Common.CallSubDebug2(Common.java:1055)
    at aaa.erp2.app_erp2.b4xpagesmanager._createpageifneeded(b4xpagesmanager.java:771)
    at aaa.erp2.app_erp2.b4xpagesmanager._showpage(b4xpagesmanager.java:1268)
    at aaa.erp2.app_erp2.b4xpagesmanager._addpage(b4xpagesmanager.java:282)
    at aaa.erp2.app_erp2.b4xpagesmanager._addpageandcreate(b4xpagesmanager.java:296)
    at aaa.erp2.app_erp2.b4xpagesmanager._initialize(b4xpagesmanager.java:1045)
    at aaa.erp2.app_erp2.main$ResumableSub_Activity_Create.resume(main.java:571)
    at aaa.erp2.app_erp2.main._activity_create(main.java:489)
    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 aaa.erp2.app_erp2.main.afterFirstLayout(main.java:105)
    at aaa.erp2.app_erp2.main.access$000(main.java:17)
    at aaa.erp2.app_erp2.main$WaitForLayout.run(main.java:83)
    at android.os.Handler.handleCallback(Handler.java:739)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:148)
    at android.app.ActivityThread.main(ActivityThread.java:5417)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at anywheresoftware.b4a.debug.Debug.CallSub4(Debug.java:336)
    at anywheresoftware.b4a.debug.Debug.CallSubNew2(Debug.java:285)
    ... 25 more
Caused by: java.lang.reflect.InvocationTargetException
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.debug.Debug.CallSub4(Debug.java:318)
    ... 26 more
Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: aaa.erp2.app_erp2.MapFragmentWrapper
    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:312)
    at aaa.erp2.app_erp2.b4xmainpage._b4xpage_created(b4xmainpage.java:201)
    ... 28 more
Caused by: java.lang.ClassNotFoundException: aaa.erp2.app_erp2.MapFragmentWrapper
    at java.lang.Class.classForName(Native Method)
    at java.lang.Class.forName(Class.java:324)
    at java.lang.Class.forName(Class.java:285)
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:389)
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:453)
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:148)
    ... 31 more
Caused by: java.lang.ClassNotFoundException: Didn't find class "aaa.erp2.app_erp2.MapFragmentWrapper" on path: DexPathList[[zip file "/data/app/aaa.erp2.app_erp2-2/base.apk"],nativeLibraryDirectories=[/data/app/aaa.erp2.app_erp2-2/lib/arm64, /vendor/lib64, /system/lib64]]
    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
    ... 37 more
    Suppressed: java.lang.ClassNotFoundException: aaa.erp2.app_erp2.MapFragmentWrapper
        at java.lang.Class.classForName(Native Method)
        at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
        at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
        ... 38 more
    Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
** Activity (main) Resume **

B4XMainPage:
#Region Shared Files
#CustomBuildAction: folders ready, %WINDIR%\System32\Robocopy.exe,"..\..\Shared Files" "..\Files"
'Ctrl + click to sync files: ide://run?file=%WINDIR%\System32\Robocopy.exe&args=..\..\Shared+Files&args=..\Files&FilesSync=True
#End Region

'Ctrl + click to export as zip: ide://run?File=%B4X%\Zipper.jar&Args=Project.zip

Sub Class_Globals
    Private Root As B4XView
    Private xui As XUI
    
    Private Canvas1 As Canvas
    
    'Public pagMain As frmMain
    Public pagScreen1 As frmScreen1
    Public pagScreen2 As frmScreen2
    Public pagScreen3 As frmScreen3
    Public pagScreen6 As frmScreen6
    
    Public pagConfigurazione As frmConfigurazione
    Public pagCheck As frmCheck
    Public pagComandi As frmComandi
    Public pagColori As frmColori
    
    Public pagGps As frmGps
    Public pagMappa As frmMappa
    Public pagMqtt As frmMqtt
    Public pagSms As frmSms
    Public pagPassword As frmPassword
    Public pagUpdater As frmUpdater
    Public pagWeb As frmWeb
    
    Public ImageView1 As ImageView
    Private lblNumeroTelefonico As Label
    Private lblNetworkOperatorName As Label
    Private lblNetworkType As Label
'    Private lblMessaggio As Label
    Private lblMonitoraggioAttivo As Label
    
'    Private cmdVerificaPermessi As Button
    Private lblDeviceId As Label
    Public lblMqttConnection As Label
    Public lblBatteryVoltage As Label
    Public lblBatteryTemperature As Label
    Public lblTempoAvvio As Label
    Private cmdConfigurazione As Button
End Sub

Public Sub Initialize
    
End Sub

'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
    GlobRob.logga("B4XMainpage.B4XPage_Created")
    
    Root = Root1
    Root.LoadLayout("frmMain")
    Canvas1.Initialize(Root)
    
    'pagMain.Initialize:                B4XPages.AddPage("Main",pagMain)
    pagConfigurazione.Initialize:    B4XPages.AddPage("Configurazione",pagConfigurazione)
    pagComandi.Initialize:            B4XPages.AddPage("Comandi", pagComandi)
    pagCheck.Initialize:            B4XPages.AddPage("Check", pagCheck)
    pagColori.Initialize:            B4XPages.AddPage("Colori", pagColori)
 

Andrew (Digitwell)

Well-Known Member
Licensed User
Longtime User
The following section of the stacktrace seems to be the cause.
Are you using a map on one of the pages?

 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…