Android Question new Works in DEBUG but not in RELEASE!!!

macerau

Member
Licensed User
Longtime User
In mode RELEASE!:
1608581515908.png


in mode DEBUG:
1608581589938.png


1608581727469.png


Log in Debug:
Logger connected to: samsung SM-P585M
--------- beginning of main
Copying updated assets files (1)
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** 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) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
main_activity_create (java line: 350)
java.io.FileNotFoundException: layout.bal
at android.content.res.AssetManager.openAsset(Native Method)
at android.content.res.AssetManager.open(AssetManager.java:388)
at android.content.res.AssetManager.open(AssetManager.java:362)
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 ATB.COM.main._activity_create(main.java:350)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:213)
at ATB.COM.main.afterFirstLayout(main.java:105)
at ATB.COM.main.access$000(main.java:17)
at ATB.COM.main$WaitForLayout.run(main.java:83)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:7000)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
main_activity_create (java line: 350)
java.io.FileNotFoundException: layout.bal
at android.content.res.AssetManager.openAsset(Native Method)
at android.content.res.AssetManager.open(AssetManager.java:388)
at android.content.res.AssetManager.open(AssetManager.java:362)
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 ATB.COM.main._activity_create(main.java:350)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:213)
at ATB.COM.main.afterFirstLayout(main.java:105)
at ATB.COM.main.access$000(main.java:17)
at ATB.COM.main$WaitForLayout.run(main.java:83)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:7000)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
main_activity_create (java line: 350)
java.io.FileNotFoundException: layout.bal
at android.content.res.AssetManager.openAsset(Native Method)
at android.content.res.AssetManager.open(AssetManager.java:388)
at android.content.res.AssetManager.open(AssetManager.java:362)
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 ATB.COM.main._activity_create(main.java:350)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:213)
at ATB.COM.main.afterFirstLayout(main.java:105)
at ATB.COM.main.access$000(main.java:17)
at ATB.COM.main$WaitForLayout.run(main.java:83)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:7000)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
main_activity_create (java line: 350)
java.io.FileNotFoundException: layout.bal
at android.content.res.AssetManager.openAsset(Native Method)
at android.content.res.AssetManager.open(AssetManager.java:388)
at android.content.res.AssetManager.open(AssetManager.java:362)
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 ATB.COM.main._activity_create(main.java:350)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:213)
at ATB.COM.main.afterFirstLayout(main.java:105)
at ATB.COM.main.access$000(main.java:17)
at ATB.COM.main$WaitForLayout.run(main.java:83)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:7000)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
main_activity_create (java line: 350)
java.io.FileNotFoundException: layout.bal
at android.content.res.AssetManager.openAsset(Native Method)
at android.content.res.AssetManager.open(AssetManager.java:388)
at android.content.res.AssetManager.open(AssetManager.java:362)
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 ATB.COM.main._activity_create(main.java:350)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:213)
at ATB.COM.main.afterFirstLayout(main.java:105)
at ATB.COM.main.access$000(main.java:17)
at ATB.COM.main$WaitForLayout.run(main.java:83)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:7000)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
main_activity_create (java line: 350)
java.io.FileNotFoundException: layout.bal
at android.content.res.AssetManager.openAsset(Native Method)
at android.content.res.AssetManager.open(AssetManager.java:388)
at android.content.res.AssetManager.open(AssetManager.java:362)
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 ATB.COM.main._activity_create(main.java:350)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:213)
at ATB.COM.main.afterFirstLayout(main.java:105)
at ATB.COM.main.access$000(main.java:17)
at ATB.COM.main$WaitForLayout.run(main.java:83)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:7000)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
main_activity_create (java line: 350)
java.io.FileNotFoundException: layout.bal
at android.content.res.AssetManager.openAsset(Native Method)
at android.content.res.AssetManager.open(AssetManager.java:388)
at android.content.res.AssetManager.open(AssetManager.java:362)
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 ATB.COM.main._activity_create(main.java:350)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:213)
at ATB.COM.main.afterFirstLayout(main.java:105)
at ATB.COM.main.access$000(main.java:17)
at ATB.COM.main$WaitForLayout.run(main.java:83)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:7000)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **

1608581983956.png
 

Attachments

  • LX.zip
    461.8 KB · Views: 167
  • 1608581703646.png
    1608581703646.png
    185.2 KB · Views: 146

Erel

B4X founder
Staff member
Licensed User
Longtime User
Works fine here as well.
Note that you can see the layout files inside the APK (it is a zip file). The files should be in the assets folder.
Check it after you compile in release mode.

My guess is that you are using an old Android SDK. Delete it and carefully follow the installation instructions: https://www.b4x.com/b4a.html
It will work.
 
Upvote 0

macerau

Member
Licensed User
Longtime User
I tried to do everything you asked for,
I uninstall up everything that referred to Java, I uninstall up B4A,
I cleaned RegEdit. used your help download java 11 step by step reinstalled B4A but when using SDKmananger the screen below appears.
already installed java 11,15,8 sdk etc all indicates that JAVA_HOME is not right I already used SET JAVA_HOME = C: \ JAVA \ SDK-11.0.1 \ BIN and includes it in the PATH = of the system but the error remains. do you have any idea what's wrong? Want access to the machine?
 

Attachments

  • Clipboard34.jpg
    Clipboard34.jpg
    85.8 KB · Views: 137
  • Clipboard35.jpg
    Clipboard35.jpg
    70.6 KB · Views: 133
Upvote 0

MikeSW17

Active Member
Licensed User
Longtime User
Did you extract the ZIPs with 7-Zip? Windows extract (often) corrupts the folder structure.

Also (in my installation), Java doesn't need to be in the path. Just set the necessary locations in B4A->Tools->Configure Paths.

Probably just personal preference(?), but I put the extracted folders directly in the Java folder, without the intervening 'SDK-11.0.1" folder.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I cleaned RegEdit. used your help download java 11 step by step reinstalled B4A but when using SDKmananger the screen below appears.
already installed java 11,15,8 sdk etc all indicates that JAVA_HOME is not right I already used SET JAVA_HOME = C: \ JAVA \ SDK-11.0.1 \ BIN and includes it in the PATH = of the system but the error remains. do you have any idea what's wrong?
All of these steps are not needed and will not help in any way.

Just follow the installation instructions and it will work. I'm100% sure that you are still using an old version of Android build tools. This will cause the exact error you encounter.
 
Upvote 0
Top