添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
爱跑步的沙滩裤  ·  JSX ...·  1 年前    · 
任性的手电筒  ·  Microsoft Office ...·  2 年前    · 
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

UnsatisfiedLinkError: Native library (com/sun/jna/android-x86-64/libjnidispatch.so) not found in resource path (.)

Ask Question

i'm develop android app for sniffing packets from device. I'm using pcap4j library, but when call Pcaps.getDevByAddress(), launches the exception. Can you help me?

This is snipped code:

InetAddress destAddr = parsedPacket; 

PcapNetworkInterface nif =Pcaps.getDevByAddress(destAddr);

Thanks

Not sure if this might still be an issue for you. Have you added both dependencies to you classpath?

Add the following to your pom.xml:

<dependencies>
 <dependency>
  <groupId>org.pcap4j</groupId>
  <artifactId>pcap4j-core</artifactId>
  <version>1.7.3</version>
 </dependency>
 <dependency>
  <groupId>org.pcap4j</groupId>
  <artifactId>pcap4j-packetfactory-static</artifactId>
  <version>1.7.3</version>
 </dependency>
</dependencies>

Also make sure you have installed pcaplib-dev on your machine. Depends on OS how to install it.

Did you perform these steps?

If so, have you given java root access (assuming you are on linux)? I have seen people getting issues after they used the set_cap command. Please let me know!

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.