Android Question [Solved] Problem after SDK update

Lello1964

Well-Known Member
Licensed User
Hi i have just update B4A SDK Manager to latest updates.

Now when i try to compile and start my app un Debug o Release mode have this error :

B4X:
>>>>>> START com.android.internal.os.RuntimeInit uid 2000 <<<<<<
CheckJNI is OFF
No timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat
register_android_hardware_Radio DONE
Calling main entry com.android.commands.am.Am
START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=pagamico.app.apk/.main} from uid 2000 on display 0
Shutting down VM
Start proc 1796:pagamico.app.apk/u0a78 for activity pagamico.app.apk/.main
Class androidx.core.content.FileProvider failed lock verification and will run slower.
Common causes for lock verification issues are non-optimized dex code
and incorrect proguard optimizations.
Class anywheresoftware.b4a.BA failed lock verification and will run slower.
common created.
Starting remote logger. Port: 64617
Initialized EGL, version 1.4
Swap behavior 1
*** Debugger waiting for connection (0) ***
Displayed pagamico.app.apk/.main: +343ms
*** Debugger waiting for connection (1) ***
Class androidx.core.content.ContextCompat failed lock verification and will run slower.
null,0
java.lang.ArrayIndexOutOfBoundsException: length=20; index=90
    at java.lang.reflect.Array.set(Array.java:450)
    at anywheresoftware.b4a.shell.ArraysUtils.setElement(ArraysUtils.java:84)
    at anywheresoftware.b4a.shell.Shell.setArrayElement(Shell.java:591)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:386)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
    at pagamico.app.apk.starter.onCreate(starter.java:48)
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:3192)
    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)[/COLOR]
*** Service (starter) Create ***
-1 received (controller)
Shutting down VM
]java.lang.RuntimeException: Unable to create service pagamico.app.apk.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
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:175)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:193)
    at pagamico.app.apk.starter.onCreate(starter.java:56)
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:3192)
    ... 8 more
Caused by: java.net.SocketException: Socket closed
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(SocketInputStream.java:151)
    at java.net.SocketInputStream.read(SocketInputStream.java:120)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:254)
    at java.io.DataInputStream.readByte(DataInputStream.java:268)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:344)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
    ... 11 more
FATAL EXCEPTION: main
Process: pagamico.app.apk, PID: 1796
java.lang.RuntimeException: Unable to create service pagamico.app.apk.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
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:175)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:193)
    at pagamico.app.apk.starter.onCreate(starter.java:56)
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:3192)
    ... 8 more
Caused by: java.net.SocketException: Socket closed
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(SocketInputStream.java:151)
    at java.net.SocketInputStream.read(SocketInputStream.java:120)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:254)
    at java.io.DataInputStream.readByte(DataInputStream.java:268)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:344)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
    ... 11 more
  Force finishing activity pagamico.app.apk/.main
System.exit called, status: 0
VM exiting with result code 0, cleanup skipped.
channel 'd62412 Toast (server)' ~ Consumer closed input channel or an error occurred.  events=0x9
channel 'd62412 Toast (server)' ~ Channel is unrecoverably broken and will be disposed!
channel '4f0c661 pagamico.app.apk/pagamico.app.apk.main (server)' ~ Consumer closed input channel or an error occurred.  events=0x9
channel '4f0c661 pagamico.app.apk/pagamico.app.apk.main (server)' ~ Channel is unrecoverably broken and will be disposed!
WIN DEATH: Window{d62412 u0 Toast}
Attempted to unregister already unregistered input channel 'd62412 Toast (server)'
Initialized EGL, version 1.4
Swap behavior 1
Buffer count: 4
Process pagamico.app.apk (pid 1796) has died
cleanUpApplicationRecord -- 1796
WIN DEATH: Window{4f0c661 u0 pagamico.app.apk/pagamico.app.apk.main}
Attempted to unregister already unregistered input channel '4f0c661 pagamico.app.apk/pagamico.app.apk.main (server)'
Finishing op nesting under-run: uid 1000 pkg android code 24 time=0 duration=0 nesting=0
Ignoring remove of inactive process: ProcessRecord{a2e33c3 0:pagamico.app.apk/u0a78}
Incorrectly called buildLayer on View: ShortcutAndWidgetContainer, destroying layer...
Object died trying to hide notification android.app.ITransientNotification$Stub$Proxy@543a440 in package pagamico.app.apk
Attempted to remove non-existing token: android.os.Binder@d55ce47
 

Lello1964

Well-Known Member
Licensed User
My mistake :

B4X:
    Public Poll(10)    As String
  
    Poll(0)    = "OK"    ' Comando ricevuto
    Poll(1)    = "CON" ' Connesso
    Poll(2)    = "DIS" ' Disconnesso
    Poll(3)    = "OCC" ' Occupato
    Poll(4)    = "RIC" ' Ricevuto
    Poll(5)    = "ATT" ' Attendere
    Poll(6)    = "RIF" ' Connessione rifiutata
    Poll(7)    = "ERR" ' Parametro inviato errato
    Poll(8)    = "ERC" ' Comando inviato errato
    Poll(9)    = "NOC" ' Dispositivo non ancora connesso
    Poll(10)= "POL" ' Polling
    Poll(90)= "RES" ' Reboot Pagamico
I've declared Poll(10) and used Poll(90)
 

udg

Expert
Licensed User
You used poll(10) too ..
 
Top