Cryonet and Android

I try to use Kryonet in an Android application, but when I try to use it on an Android virtual device and even on my Android mobile phone, I get this error:

-Could not find class 'com.esotericsoftware.kryonet.Client', referenced from method com.Boussole.phone.MainActivity.onCreate 

I already added Kryonet to the build path:

 properties/java build path --> Libraries-->add jars --> kryonet-2.18-all.jar 
+7
source share
2 answers

If you use Eclipse with ADT, the only thing you need to do is when you want to add the jar library to copy and paste it into the libs folder (this folder already exists in your Android project), and ADT will take care of adding it to the build path.

In fact, you have no choice if you add your jar file to the build path (as before), it will compile correctly, but when you launch your application, it will provide you with a NoClassDefFoundException.

(answer already mentioned in njzk2 short comment)

+3
source

I had to import the project into the eclipse workspace. across...

File> Import> Existing projects in the workspace. This is for the top level of the project. (I assume it was downloaded from github?)

I copied the lib files to the folder of my Android projects.

I got some errors, but then ran eclipse as an administrator, which solved every error. Since buildconfig could not be created on my Facebook SDK.

0
source

All Articles