Android Question Compilation Error: Unable to create service

HZZ

Active Member
Licensed User
My project was compiling fine until suddenly it fails giving the following error:
PS: Project uses no Internet or lib which uses internet. Does not use any service - Its B4xPages project.
Any help would be appreciated.


B4X:
Logger connected to: 127.0.0.1:21503
--------- beginning of system
--------- beginning of main
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
17
*** Service (service1) Create ***
** Service (service1) Start **
** Activity (main) Pause, UserClosed = false **
PackageAdded: package:com.msn
java.lang.RuntimeException: Unable to create service com.msn.starter: java.lang.RuntimeException: java.net.SocketException: Socket closed
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:3202)
    at android.app.ActivityThread.-wrap5(ActivityThread.java)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1568)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:154)
    at android.app.ActivityThread.main(ActivityThread.java:6121)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
Caused by: java.lang.RuntimeException: java.net.SocketException: Socket closed
 

HZZ

Active Member
Licensed User
Does it still happen? Make sure that you don't have any illegal code in globals subs.
Check the unfiltered logs and see whether there is an error before this one.
I have realized that this is happening more frequently when logger is connected to emulator through adb on port 21503 (NAT Mode)
So alternate solution for the time being is that I am avoiding connecting using adb and relying on B4A-Bridge - which has only drawback that every time code is compiled it gives that annoying "Install Application" dialog but at least does not crash on socket error.
 
Upvote 0
Top