Android Question Material Icon Library crashing

Scantech

Well-Known Member
Licensed User
Don, This is the error i receive.

Logger connected to: emulator-5554
--------- beginning of crash
--------- beginning of system
--------- beginning of main
** Activity (main) Create, isFirst = true **
Panel size is unknown. Layout may not be loaded correctly.
** Activity (main) Resume **
** Activity (main) Create, isFirst = true **
Panel size is unknown. Layout may not be loaded correctly.
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = true **
Copying updated assets files (1)
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = true **
** Service (starter) Destroy (ignored)**
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = true **
** Service (starter) Destroy (ignored)**
** Activity (main) Resume **
android.permission.WRITE_EXTERNAL_STORAGE true
android.permission.ACCESS_COARSE_LOCATION true
false, Billing service unavailable on device. (response: 3:Billing Unavailable)
Subscriptions supported: false
*** Service (comserial) Create ***
** Service (comserial) Start **
*** Service (starter) Create ***
Using FileProvider? true
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
Class not found: de.donmanfred.MaterialIconViewWrapper, trying: scantech.cardiagnosticpro.MaterialIconViewWrapper
Error 1
MAP READ
Panel size is unknown. Layout may not be loaded correctly.
MAP READ
** Activity (main) Resume **
android.permission.WRITE_EXTERNAL_STORAGE true
android.permission.ACCESS_COARSE_LOCATION true
false, Billing service unavailable on device. (response: 3:Billing Unavailable)
Subscriptions supported: false
*** Service (comserial) Create ***
** Service (comserial) Start **
** Activity (main) Pause, UserClosed = true **
*** Service (starter) Create ***
Using FileProvider? true
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
Class not found: de.donmanfred.MaterialIconViewWrapper, trying: scantech.cardiagnosticpro.MaterialIconViewWrapper
Error occurred on line: 4858 (Main)
java.lang.RuntimeException: java.lang.ClassNotFoundException: scantech.cardiagnosticpro.MaterialIconViewWrapper
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:170)
at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
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 anywheresoftware.b4a.BA.raiseEvent2(BA.java:180)
at anywheresoftware.b4a.debug.Debug.delegate(Debug.java:262)
at scantech.cardiagnosticpro.main._initmenu(main.java:1416)
at scantech.cardiagnosticpro.main._activity_create(main.java:1264)
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 scantech.cardiagnosticpro.main.afterFirstLayout(main.java:104)
at scantech.cardiagnosticpro.main.access$000(main.java:17)
at scantech.cardiagnosticpro.main$WaitForLayout.run(main.java:82)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
Caused by: java.lang.ClassNotFoundException: scantech.cardiagnosticpro.MaterialIconViewWrapper
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:400)
at java.lang.Class.forName(Class.java:326)
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:390)
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:454)
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:454)
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:148)
... 27 more
Caused by: java.lang.ClassNotFoundException: Didn't find class "scantech.cardiagnosticpro.MaterialIconViewWrapper" on path: DexPathList[[zip file "/data/app/scantech.cardiagnosticpro-2/base.apk"],nativeLibraryDirectories=[/data/app/scantech.cardiagnosticpro-2/lib/x86, /system/lib, /vendor/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
... 34 more
MAP READ
Panel size is unknown. Layout may not be loaded correctly.
MAP READ
** Activity (main) Resume **
Copying updated assets files (1)
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
Copying updated assets files (1)
*** Service (starter) Create ***
Using FileProvider? true
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
MAP READ
Panel size is unknown. Layout may not be loaded correctly.
MAP READ
** Activity (main) Resume **
android.permission.WRITE_EXTERNAL_STORAGE true
android.permission.ACCESS_COARSE_LOCATION true
false, Billing service unavailable on device. (response: 3:Billing Unavailable)
Subscriptions supported: false
*** Service (comserial) Create ***
** Service (comserial) Start **
PageChanged: 0
PageCreated: 0
** Activity (main) Pause, UserClosed = false **
No wakelock.
** Activity (about) Create, isFirst = true **
Error occurred on line: 85 (About)
java.lang.RuntimeException: Font asset not found materialdesignicons-webfont.ttf
at android.graphics.Typeface.createFromAsset(Typeface.java:206)
at net.steamcrafted.materialiconlib.MaterialIconUtils.getTypeFace(MaterialIconUtils.java:21)
at net.steamcrafted.materialiconlib.MaterialDrawableBuilder.<init>(MaterialDrawableBuilder.java:56)
at net.steamcrafted.materialiconlib.MaterialDrawableBuilder.with(MaterialDrawableBuilder.java:68)
at net.steamcrafted.materialiconlib.MaterialIconView.init(MaterialIconView.java:71)
at net.steamcrafted.materialiconlib.MaterialIconView.<init>(MaterialIconView.java:26)
at de.donmanfred.MaterialIconViewwrapper._initialize(MaterialIconViewwrapper.java:68)
at de.donmanfred.MaterialIconViewwrapper.Initialize(MaterialIconViewwrapper.java:53)
at cargauge.customlistview4.customlistview4._insertattextitem(customlistview4.java:986)
at cargauge.customlistview4.customlistview4._addtextitem(customlistview4.java:89)
at scantech.cardiagnosticpro.about._initlistview(about.java:485)
at scantech.cardiagnosticpro.about._activity_create(about.java:381)
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:348)
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 scantech.cardiagnosticpro.about.afterFirstLayout(about.java:104)
at scantech.cardiagnosticpro.about.access$000(about.java:17)
at scantech.cardiagnosticpro.about$WaitForLayout.run(about.java:82)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
** Activity (about) Resume **
 

DonManfred

Expert
Licensed User
Last edited:

Scantech

Well-Known Member
Licensed User
Your example

B4A v9.00
Regular Debug Mode - Failed
Changed to Debug Legacy - OK
Back to Regular Debug - OK
Release Mode - OK

Something is weird.

I was using Material Icon 1.5 with my project and worked ok up to B4A V8.80. Material Icon 2.0 will not work with my project in any b4A Versions.
 
Last edited:

Scantech

Well-Known Member
Licensed User
Can you help me with a workaround.

I see the .aar contains the resources.

I can add \res to AddtionalRes:
I can add the font to the asset.
how can i deal with classes.jar?
Is there anything else i need to add to my project with this workaround?

I deleted \res file from .aar and added it to AdditionalRes: it eliminated 1 of the error and pointed error elsewhere. i want to try this workaround.
 

Scantech

Well-Known Member
Licensed User
I still have the Material Lib 1.07 and works on all B4A versions with my app. I really need the 1.5 version icons and if i transfer the attributes and font from 1.5 to 1.07 it probably should work? I will try it later and post the result.
 
Top