After removing Starter from the project altogether, I get this about fifty percent of the time when running in debug mode.
Device (emulator or real thing) shows the B4XPages main layout, side, title and navigation bars, then crash.
This is the complete unfiltered log.
java.lang.RuntimeException: java.io.EOFException
at anywheresoftware.b4a.shell.Shell.virtualAssets(Shell.java:164)
at anywheresoftware.b4a.shell.Shell.start(Shell.java:102)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:92)
at com.marcsmart.aatimer.main.afterFirstLayout(main.java:97)
at com.marcsmart.aatimer.main.access$000(main.java:17)
at com.marcsmart.aatimer.main$WaitForLayout.run(main.java:83)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.io.EOFException
at java.io.DataInputStream.readFully(DataInputStream.java:200)
at java.io.DataInputStream.readInt(DataInputStream.java:389)
at anywheresoftware.b4a.shell.Shell.virtualAssets(Shell.java:136)
... 12 more
I think perhaps something is wrong with the Manifest, which is an abomination of copy/paste from the forum:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="30"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
''CreateResourceFromFile(Macro, Themes.LightTheme)
'End of default text.
' -----------------------------------------------------------------------------------------------------------
' theme shit
' -----------------------------------------------------------------------------------------------------------
SetApplicationAttribute(android:theme, "@style/LightTheme")
CreateResource(values, colors.xml,
<resources>
<color name="actionbar">#ff70B5D6</color>
<color name="statusbar">#ff000000</color>
<color name="textColorPrimary">#FF696969</color>
<color name="navigationBar">#ff70B5D6</color>
</resources>
)
CreateResource(values-v20, theme.xml,
<resources>
<style name="LightTheme" parent="@android:style/Theme.Material.Light">
<item name="android:colorPrimary">@color/actionbar</item>
<item name="android:colorPrimaryDark">@color/statusbar</item>
<item name="android:textColorPrimary">@color/textColorPrimary</item>
<item name="android:navigationBarColor">@color/navigationBar</item>
<item name="android:actionBarSize">40dp</item>
</style>
</resources>
)
CreateResource(values-v14, theme.xml,
<resources>
<style name="LightTheme" parent="@android:style/Theme.Holo.Light">
<item name="android:actionBarStyle">@style/CustomActionBarStyle</item>
</style>
<style name="CustomActionBarStyle" parent="@android:style/Widget.Holo.Light.ActionBar.Solid.Inverse">
<item name="android:background">@color/actionbar</item>
</style>
</resources>
)
' -----------------------------------------------------------------------------------------------------------
' Firebase AdMob shit
' -----------------------------------------------------------------------------------------------------------
CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
CreateResourceFromFile(Macro, FirebaseAdMob.FirebaseAds)
'AddReplacement($ADMOB_APP_ID$, ca-app-pub-12673333333~6xxxxxxxxxxxxxxxxx)
AddReplacement($ADMOB_APP_ID$, ca-app-pub-5280477437506677~yyyyyyyyyyyy9)
' -----------------------------------------------------------------------------------------------------------
' cleartext shit
' -----------------------------------------------------------------------------------------------------------
SetApplicationAttribute(android:networkSecurityConfig, @xml/network_security_config)
CreateResource(xml, network_security_config.xml,
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">www.marcsmartsoftware.com</domain>
</domain-config>
</network-security-config>
)