Android Question Error load BAL files in version 8.8

rodsilla

Member
Licensed User
Longtime User
I have version 8.8, before I have other versions but unistaller and delete folder from users/appdata/roaming that generate conflicts, well I have many proyects but files .bal don't find when launch app this error

B4X:
Registo conectado a:  samsung SM-T280
--------- beginning of system
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
main_activity_create (java line: 341)
java.io.FileNotFoundException: pantalla.bal
    at android.content.res.AssetManager.openAsset(Native Method)
    at android.content.res.AssetManager.open(AssetManager.java:350)
    at android.content.res.AssetManager.open(AssetManager.java:324)
    at anywheresoftware.b4a.objects.streams.File.OpenInput(File.java:207)
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:82)
    at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
    at b4a.example.main._activity_create(main.java:341)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:196)
    at b4a.example.main.afterFirstLayout(main.java:104)
    at b4a.example.main.access$000(main.java:17)
    at b4a.example.main$WaitForLayout.run(main.java:82)
    at android.os.Handler.handleCallback(Handler.java:739)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:145)
    at android.app.ActivityThread.main(ActivityThread.java:6939)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)

the file from very simple proyect that call .bal don't work, the ball file its save in files folder, please help

this code from proyect:

B4X:
#Region  Project Attributes
    #ApplicationLabel: B4A Example
    #VersionCode: 1
    #VersionName:
    'SupportedOrientations possible values: unspecified, landscape or portrait.
    #SupportedOrientations: unspecified
    #CanInstallToExternalStorage: False
    #BridgeLogger: true
#End Region

#Region  Activity Attributes
    #FullScreen: False
    #IncludeTitle: True
#End Region

Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.

End Sub

Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.

End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    Activity.LoadLayout("pantalla")

End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub

the manifest its:

B4X:
'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="26"/>
<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.DarkTheme)
'End of default text.

I realize test with old versions and work fine
 
Last edited:

techknight

Well-Known Member
Licensed User
Longtime User
Not sure I fully understand the poll and the question over the broken english. Sorry. Also your bal files must be in the Files folder along with everything else before compiling or you will run into weird issues like this. The newer versions of B4A has a files tab, you can press the Sync button and your BAL layout files should show up there, check this.

If they do not show up, or otherwise disappear, check the folder path because I know with B4X if there are spaces or weird characters in the folder paths, these things can happen.
 
Upvote 0

rodsilla

Member
Licensed User
Longtime User
Not sure I fully understand the poll and the question over the broken english. Sorry. Also your bal files must be in the Files folder along with everything else before compiling or you will run into weird issues like this. The newer versions of B4A has a files tab, you can press the Sync button and your BAL layout files should show up there, check this.

If they do not show up, or otherwise disappear, check the folder path because I know with B4X if there are spaces or weird characters in the folder paths, these things can happen.
sorry techknight I from Colombia, I posted in this language because the answer is very fast and the solution is in many members that speak English.

the link don't solve the problem, I try with manager files from users folder
 
Upvote 0
Top