문제

I have downloaded the latest version of jnetpcap and added it to my android project in eclipse as "Add external JAR". But when I'm running the program the application crashes immediately on my emulator and I receive the following error in the log:

java.lang.NoClassDefFoundError: org.jnetpcap.Pcap

Does anyone know how to solve this problem?

도움이 되었습니까?

해결책

You need to compile jnetpcap c files as shared library (.so) with the Android NDK first. Then you need to create your own JNI or use an existing one like this made available in the official website related to this thread. Look here.

다른 팁

Did you export the library? In the Build Path of eclipse on the 4th page, make sure that it exists above any code that may use it, and make sure it's checked.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top