I’ve been trying to use Thrift in my android app to handle RPC’s with a server. I add the thrift .jar file to my class path (Properties > Java Build Path > Libraries). I get no problems during compilation but during runtime I get a NoClassDefFoundError when using anything from the jar.
Do I have to do anything else to tell eclipse/android where libraries are located?
Cheers!
TSocket transport = null;
try {
transport = new org.apache.thrift.transport.TSocket(sock); <--- OFFENDING CODE
} catch (TTransportException e1) {e1.printStackTrace(); }
Please copy the jar file to project then add it to build path. I think you added from external path so it was not added in apk file.