My librarie no work with targetSdkVersion="14"

alan1968

Active Member
Licensed User
Longtime User
A smal problem with my librarie MODBUS

in manifest.xml

with ics :

<uses-sdk android:minSdkVersion="3" android:targetSdkVersion="14"/>
no works /app close if access at a fonction of my lib

<uses-sdk android:minSdkVersion="3" android:targetSdkVersion="7"/>
Works fine but no ics style

Why ?
 
Last edited:

alan1968

Active Member
Licensed User
Longtime User
Voici
B4X:
** Activity (main) Resume **
main_set_ip_wago (java line: 19246)
android.os.NetworkOnMainThreadException
   at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1099)
   at java.net.InetAddress.lookupHostByName(InetAddress.java:391)


   at java.net.InetAddress.getAllByNameImpl(InetAddress.java:242)
   at java.net.InetAddress.getByName(InetAddress.java:295)
   at com.exemple.android.modbus_b4a.Ip(modbus_b4a.java:74)
   at wagoidpro.projet.main._set_ip_wago(main.java:19246)
   at wagoidpro.projet.main._activity_resume(main.java:1250)
   at java.lang.reflect.Method.invokeNative(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:511)
   at anywheresoftware.b4a.BA.raiseEvent2(BA.java:165)
   at anywheresoftware.b4a.BA.raiseEvent(BA.java:149)
   at wagoidpro.projet.main$ResumeMessage.run(main.java:210)
   at android.os.Handler.handleCallback(Handler.java:605)
   at android.os.Handler.dispatchMessage(Handler.java:92)
   at anywheresoftware.b4a.Msgbox.waitForMessage(Msgbox.java:211)
   at anywheresoftware.b4a.Msgbox.msgbox(Msgbox.java:136)
   at anywheresoftware.b4a.BA.raiseEvent2(BA.java:202)
   at wagoidpro.projet.main.afterFirstLayout(main.java:84)
   at wagoidpro.projet.main.access$100(main.java:16)
   at wagoidpro.projet.main$WaitForLayout.run(main.java:72)
   at android.os.Handler.handleCallback(Handler.java:605)
   at android.os.Handler.dispatchMessage(Handler.java:92)
   at android.os.Looper.loop(Looper.java:137)
   at android.app.ActivityThread.main(ActivityThread.java:4424)
   at java.lang.reflect.Method.invokeNative(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:511)
   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
   at dalvik.system.NativeStart.main(Native Method)
android.os.NetworkOnMainThreadException
 
Upvote 0

alan1968

Active Member
Licensed User
Longtime User
yes Erel ,i search on google, I saw this :-/
I have to recode all my librarie ? or there is another way to execute in another thread my fonction


thx!
 
Upvote 0
Top