Android Question Works in DEBUG but not in Release!!

macerau

Member
Licensed User
Longtime User
Hello developers,

I hope you can help.

In degug mode it works perfectly, but in Realese it doesn't work.
I believe it is a Manifesto problem, below are photos of all attempts.
Thanks
Raul

simple access to remote SQL database!!:
#Region  Project Attributes
    #ApplicationLabel: BCXK
    #VersionCode: 1
    #VersionName: BCXK
    'SupportedOrientations possible values: unspecified, landscape or portrait.
    #SupportedOrientations: unspecified
    #CanInstallToExternalStorage: False
#End Region

#Region  Activity Attributes
    #FullScreen: False
    #IncludeTitle: True
#End Region
#AdditionalJar: mysql-connector-java-5.1.34-bin
#BridgeLogger: true
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
    Public LLVV As ListView
    'Public dV As List
    Private ProgressBar1 As ProgressBar
    Dim BBB As Button
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("1")
    LLVV.Initialize("LLVV")
    Activity.AddView(LLVV, 10%X , 0, 90%x, 90%y)
    BBB.BringToFront
End Sub
Sub LLVV_ItemClick (Position As Int, Value As Object)
    Activity.Title = Value &  "   "  & Position
  
End Sub

Sub Activity_Click

End Sub

Sub Activity_Resume

End Sub
Sub LV_ItemClick (Position As Int, Value As Object)
    Starter.CloseConnection
End Sub
Sub Activity_Pause (UserClosed As Boolean)

End Sub

Sub BBB_Click
    ProgressBar1.Visible = True
    Wait For (Starter.Connect) Complete (Success As Boolean)
    If Success Then
        Try
            Dim sf As Object = Starter.mysql.ExecQueryAsync("mysql", "SELECT NOMAQ,EMPRESA FROM waytekco_py.GERALWCHAVE", Null)
            Wait For (sf) mysql_QueryComplete (Success As Boolean, Crsr As JdbcResultSet)
            LLVV.Clear
          
            LLVV.Visible =True
            Dim nrow As Int
            If Success Then
                Do While Crsr.NextRow
                    'data.Add
                    nrow=nrow+1
                    LLVV.AddTwoLines2( Crsr.GetString("nomaq")  , Crsr.GetString("empresa"), nrow )
                    Log($"Id: ${Crsr.GetString("nomaq")}, Name: ${Crsr.GetString("empresa")}"$)
                Loop
                Crsr.Close
            Else
              
                Log(LastException)
                  
            End If
        Catch
            Success = False
            Log(LastException)
        End Try
      
      
        Starter.CloseConnection
    End If
    ProgressBar1.Visible = False

End Sub
 

Attachments

  • Clipboard01.jpg
    122.2 KB · Views: 170
  • Clipboard02.jpg
    126.8 KB · Views: 276
  • Clipboard03.jpg
    118.8 KB · Views: 213
  • Clipboard04.jpg
    31 KB · Views: 184
  • Clipboard05.jpg
    37.9 KB · Views: 178
  • Clipboard06.jpg
    48.3 KB · Views: 179
  • Clipboard09.jpg
    32.2 KB · Views: 153
  • Clipboard08.jpg
    38 KB · Views: 164
  • Clipboard07.jpg
    18.8 KB · Views: 184
  • Clipboard10.jpg
    53.9 KB · Views: 165
  • Clipboard11.jpg
    37.2 KB · Views: 152
Last edited:

macerau

Member
Licensed User
Longtime User
*** Serviço (inicial) Criar ***
** Início do serviço (inicial) **
** Criar atividade (principal), isFirst = true **
main_activity_create (linha java: 356) ?
java.io.FileNotFoundException: mytela.bal there is certainly no mistake here!
em android.content.res.AssetManager.openAsset (Método nativo)
em android.content.res.AssetManager.open (AssetManager.java:388)
em android.content.res.AssetManager.open (AssetManager.java:362)
em anywheresoftware.b4a.objects.streams.File.OpenInput (File.java:207)
em anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout (LayoutBuilder.java:82)
em anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout (ActivityWrapper.java:209)
em CHV.COM.main._activity_create (main.java:356)
em java.lang.reflect.Method.invoke (Método nativo)
em anywheresoftware.b4a.BA.raiseEvent2 (BA.java:213)
em CHV.COM.main.afterFirstLayout (main.java:105)
em CHV.COM.main.access $ 000 (main.java:17)
em CHV.COM.main $ WaitForLayout.run (main.java:83)
em android.os.Handler.handleCallback (Handler.java:790)
em android.os.Handler.dispatchMessage (Handler.java:99)
em android.os.Looper.loop (Looper.java:164)
em android.app.ActivityThread.main (ActivityThread.java:7000)
em java.lang.reflect.Method.invoke (Método nativo)
em com.android.internal.os.RuntimeInit $ MethodAndArgsCaller.run (RuntimeInit.java:441)
em com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1408)
 
Upvote 0

macerau

Member
Licensed User
Longtime User
I tested in DEBUG and RELEASE without loading LAYOUT,
and saved the logs in DEBUG and RELEASE,
did not error and the program opened NORMALLY!
The problem seems to be something in java in the layout reading process
 

Attachments

  • Clipboard21.jpg
    287.6 KB · Views: 111
  • Clipboard22.jpg
    304.4 KB · Views: 111
  • log in debug.txt
    76.1 KB · Views: 132
  • log in release.txt
    79.2 KB · Views: 119
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
3 - Tip: put the log errors using the code and/or spoiler tags to avoid to show a long text in the post.
Better to use the quote tags so the logs don't get marked up as code.

- Colin.
 
Upvote 0

macerau

Member
Licensed User
Longtime User
done!
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…