Reputation: 4573
I want to include Netty's jar into my android project.
I've tried adding it directly as a reference, but I'm getting java.lang.NoClassDefFoundError
, pointing to a class from Netty.
Another way is to put the library directly into the libs
folder, and when I'm doing so, the Eclipse's Android plugin would automatically include the jars in the libs
folder into the 'android private library'. In that case it seems that I cannot attach a source.
I tried deleting the android private library, and link everything through the reference library. It seems that the android cannot find class from reference library; because it's causing the NoClassDefFoundError
exception.
I want to know if there're proper ways to solve this problem.
NOTE: I do know that there're lots of posts about this issue.. such as this method (from the link above):
libs
in your project's root folderlibs
folderBut it's just causing the NoClassDefFoundError
exception.
I'm using Eclipse Kepler.
Upvotes: 1
Views: 1894
Reputation: 1
Above all steps give you same kind of error again and again. Don't be afraid I will solve your problem:
.jar
file, remove it from library.Upvotes: 0
Reputation: 8358
I think you didn't check the Android Private Libraries. Take a look at this answer
Upvotes: 1
Reputation: 8745
I solved such issue with the next steps:
Upvotes: 2
Reputation: 546
Try to run Project → Clean(select all projects). It should clean & rebuild everything.
If eclipse haven't imported jar you will have errors in your java files. If your projects are building with no errors and even is trying to start on emulator or device it may be problem of compilatiion. This problem happens often when using gradle. And the best solution is to clean everything and rebuild :)
Upvotes: 0