Android Question Layout File not found in Release Mode - OK in Debug

Discussion in 'Android Questions' started by Phil Thompson, Jun 20, 2019.

  1. Phil Thompson

    Phil Thompson Member Licensed User

    B4a V9.01.2
    updated all in SDKmanager
    C:\Program Files\Java\jdk1.8.0_162\bin\javac.exe

    I recently updated to 9.01.2 and a new Samsung A70( 2400x1080 pixels). Now I need to update all my apps for this new phone. In debug mode, the layout loads but only shows half the screen. However when I try to compile in release mode, I get an error. What have I missed? newphone.bal
    at android.content.res.AssetManager.nativeOpenAsset(Native Method)
    at anywheresoftware.b4a.objects.streams.File.OpenInput(
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(
    at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(
    at pgt.prescriptions.main._activity_create(
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.BA.raiseEvent2(
    at pgt.prescriptions.main.afterFirstLayout(
    at pgt.prescriptions.main.access$000(
    at pgt.prescriptions.main$
    at android.os.Handler.handleCallback(
    at android.os.Handler.dispatchMessage(
    at android.os.Looper.loop(
    at java.lang.reflect.Method.invoke(Native Method)
    at newphone.bal
    ** Activity (main) Resume **
    ** Activity (main) Pause, UserClosed = false **
    Last edited: Jun 20, 2019
  2. emexes

    emexes Well-Known Member Licensed User

    The first things I'd try are:
    1/ confirm that the file newphone.bal shows up in the Files Manager tab
    2/ check that file name newphone.bal very carefully
    2/ make sure that you don't have source files open in any other programs or windows
    3/ Tools menu, Clean Project
    4/ delete the app from the phone, to force fresh full reinstall
  3. sorex

    sorex Expert Licensed User

    did you press the sync button in the file tab?

    sometimes it shows things that aren't there anymore and the debug version might still have the file on the device.
  4. Erel

    Erel Administrator Staff Member Licensed User

    This error is related to old build tools. Download the ready to run sdk and configure the IDE to use it.
  5. Phil Thompson

    Phil Thompson Member Licensed User

    I thought I had the the new build tools. I downloaded the sdk, installed it and configured the IDE to use
    c:\android\platforms\android-28\android.jar as indicated above. Did I miss something here?

    Step 4 in the list above is the only step not yet done. I have been upgrading in the same location for many years. I guess its time to blow it all away and create a fresh install.
  6. Erel

    Erel Administrator Staff Member Licensed User

    Download the "ready to run" sdk. It is simpler to start with it.
  7. Phil Thompson

    Phil Thompson Member Licensed User

  8. Phil Thompson

    Phil Thompson Member Licensed User

    On extracting the\, I get the following error. Didn't take note of this on the original extraction. upload_2019-6-20_13-2-34.png

  9. Erel

    Erel Administrator Staff Member Licensed User

    Ignore this error. Have you configured the IDE to use the correct SDK (Tools - Configure Paths)?
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice