at the moment i'm writing a mulitplayer app for Android. For this i use Kroyonet. At least i wrote the server application (a simple Java programm running on my PC) and the Android app as the client part. When i try to connect my Nexus 4 (Android 4.2.2) with the server the application crash but if i run the app on a VM (Android 2.2) the client connect to the server. Have someone an idea how to fix this problem?

The stack trace indicates you are running the connect operation on the main thread. You'll need to put that into a background thread so as to not lock up your UI during connect. This is due to StrictMode, added in Android 2.3 but on by default since 3.0. Alternatively, if you really need the connect operation to be on the main thread, then you change the StrictMode policy.

The connect thread will only exist as long as the connection is being established. Kryonet maintains its own update thread. As long as your Client is maintained outside of the scope of any specific Activity, there should not be any problem using it from any Activity.

Okay, i swap the client creation, addListener and client start in a background thread. But now when i start the client it connect with the server, the server sends a TCP frame and then the client disconnect. Do you have any idea?

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org