Kryonet and android
Asked Answered
B

2

7

I am trying to use Kryonet in an Android application, but when I try it on the Android virtual device, and even on my Android cell 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 
Bloodshed answered 30/11, 2012 at 6:11 Comment(2)
Please add a screenshot of your build path.Hulen
put your library in the libs folder.Recha
L
3

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

Actually you have no choice, if you add your jar file to the build path (the old way) it will compile correctly but it will give you that NoClassDefFoundException when launching your app.

(the answer was already mentionned in the succinct comment of njzk2)

Lizzettelizzie answered 6/9, 2013 at 21:23 Comment(0)
B
0

I had to import the project into my eclipse workspace. via...

File > Import > Existing projects into workspace. This is for the top level of the project. (I'm assuming it has been downloaded from github?)

I did copy over the lib files into my Android projects lib folder.

I did get some errors but then ran eclipse as Administrator which solved every error. As the buildconfig failed to build in my Facebook SDK.

Briarroot answered 14/1, 2014 at 15:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.