Android Question Debug logs not showing.

Status
Not open for further replies.

IamTrying

Active Member
Licensed User
Using B4A 7.80 Beta #1. When my app is running i need to check all the debug output but nothing is showing on the log window:
vRHqXhx.png


Is this IDE bug or something else? On the android phone i have B4A bridge also running, app is also running but no debug output shown in the IDE.
 

IamTrying

Active Member
Licensed User
I tried now version 8.30 Beta and with that my app crash on start but i do not see still any logs. with version 7.30 Beta my app was running but no logs. How to fix the IDE log issue and crash issue?
 
Upvote 0

IamTrying

Active Member
Licensed User
I manually added the line you mentioned and unchecked the filter. When i run the app it exit following:

B4X:
Logger connected to:  HUAWEI MYA-L41
--------- beginning of crash
FATAL EXCEPTION: main
Process: io.t.sms, PID: 27709
java.lang.RuntimeException: java.net.SocketException: sendto failed: EBADF (Bad file descriptor)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:170)
    at anywheresoftware.b4a.BA$2.run(BA.java:360)
    at android.os.Handler.handleCallback(Handler.java:819)
    at android.os.Handler.dispatchMessage(Handler.java:104)
    at android.os.Looper.loop(Looper.java:210)
    at android.app.ActivityThread.main(ActivityThread.java:5982)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:852)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:742)
Caused by: java.net.SocketException: sendto failed: EBADF (Bad file descriptor)
    at libcore.io.IoBridge.maybeThrowAfterSendto(IoBridge.java:565)
    at libcore.io.IoBridge.sendto(IoBridge.java:534)
    at java.net.PlainSocketImpl.write(PlainSocketImpl.java:505)
    at java.net.PlainSocketImpl.access$100(PlainSocketImpl.java:42)
    at java.net.PlainSocketImpl$PlainSocketOutputStream.write(PlainSocketImpl.java:271)
    at java.io.BufferedOutputStream.flushInternal(BufferedOutputStream.java:185)
    at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:85)
    at anywheresoftware.b4a.shell.ShellConnector.sendControlMessage(ShellConnector.java:62)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:297)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:249)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:139)
    ... 8 more
Caused by: android.system.ErrnoException: sendto failed: EBADF (Bad file descriptor)
    at libcore.io.Posix.sendtoBytes(Native Method)
    at libcore.io.Posix.sendto(Posix.java:211)
    at libcore.io.BlockGuardOs.sendto(BlockGuardOs.java:278)
    at libcore.io.IoBridge.sendto(IoBridge.java:532)
    ... 18 more
--------- beginning of main
getServiceInstance failed!
getServiceInstance failed!
 
Upvote 0

IamTrying

Active Member
Licensed User
Still `Logs` are not showing. It only shows following lines (i am doing all in Debug mod).
No output from the `Log(">>> Starting .....");`

R8aeHi5.png
 
Upvote 0

IamTrying

Active Member
Licensed User
When i open empty project it fails to compile and run:

B4X:
B4A Version: 8.30 BETA #1
Parsing code.    (0.00s)
Compiling code.    (0.07s)
Compiling layouts code.    (0.00s)
Organizing libraries.    (0.00s)
Generating R file.    Error
res\values-v20\theme.xml:3: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Theme.Material'.

B4X:
#Region  Project Attributes
    #ApplicationLabel: B4A Example
    #VersionCode: 1
    #VersionName:
    'SupportedOrientations possible values: unspecified, landscape or portrait.
    #SupportedOrientations: unspecified
    #CanInstallToExternalStorage: False
#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("Layout1")
    Log("TEST")
    
End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
In your new project, in the Manifest file, you have:

1) targetSdkVersion set to 26;
2) CreateResourceFromFile(Macro, Themes.DarkTheme)

The material design probably needs at least Android-20; also, our app needs to use at least Android-26 (Google rules).

So you need to install at least the version 26 (menu Tools - SDK Manager).
 
Upvote 0

IamTrying

Active Member
Licensed User
- From SDK Manager installed:
Mffgge2.png

l4yayYR.png

- New application created which is executed but Log("") is not showing in Logs yet
h6D1sLh.png
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
- From SDK Manager installed:
- New application created which is executed but Log("") is not showing in Logs yet

With the first operation (updating sdk) you solved this:
When i open empty project it fails to compile and run:

For the log:
https://www.b4x.com/android/forum/threads/debug-logs-not-showing.93810/#post-593565

Try an empty project with just a Log("bye bye") inside Activity_Resume.

I think that you don't get the log because in the If-Else-End If block you wrote the condition returns always true!
 
Upvote 0
Status
Not open for further replies.
Top