frostwire / frostwire-jlibtorrent

A swig Java interface for libtorrent by the makers of FrostWire. Develop libtorrent based apps with the joy of coding in Java.
http://www.frostwire.com
MIT License
457 stars 139 forks source link

Compile for android failed #249

Closed tangzb617 closed 3 years ago

tangzb617 commented 3 years ago

hello, it's failed when I compile jlibtorrent for android, there are the compile result below:

Task :test FAILED

com.frostwire.jlibtorrent.BDecodeReadTest > testRead FAILED java.lang.LinkageError at BDecodeReadTest.java:24 Caused by: java.lang.UnsatisfiedLinkError at BDecodeReadTest.java:24

com.frostwire.jlibtorrent.CreateTorrentTest > testBuilderListener FAILED java.lang.NoClassDefFoundError at CreateTorrentTest.java:142

com.frostwire.jlibtorrent.CreateTorrentTest > testFromDir FAILED java.lang.NoClassDefFoundError at CreateTorrentTest.java:64

com.frostwire.jlibtorrent.CreateTorrentTest > testUsingBuilder FAILED java.lang.NoClassDefFoundError at CreateTorrentTest.java:96

com.frostwire.jlibtorrent.CreateTorrentTest > testFromFile FAILED java.lang.NoClassDefFoundError at CreateTorrentTest.java:31

com.frostwire.jlibtorrent.Sha1HashTest > testHashCode FAILED java.lang.NoClassDefFoundError at Sha1HashTest.java:19

com.frostwire.jlibtorrent.StartPausedSessionTest > startSessionNonPausedTest FAILED java.lang.NoClassDefFoundError at StartPausedSessionTest.java:21

com.frostwire.jlibtorrent.StartPausedSessionTest > startSessionPausedTest FAILED java.lang.NoClassDefFoundError at StartPausedSessionTest.java:12

com.frostwire.jlibtorrent.IntSeriesTest > addAndGetTest PASSED

com.frostwire.jlibtorrent.ChangeTrackersTest > testChangeTrackersWithTorrentInfo FAILED java.lang.NoClassDefFoundError at ChangeTrackersTest.java:97

com.frostwire.jlibtorrent.ChangeTrackersTest > testChangeTrackersUsingCreateTorrent FAILED java.lang.NoClassDefFoundError at ChangeTrackersTest.java:21

com.frostwire.jlibtorrent.ChangeTrackersTest > testChangeTrackersLowLevel FAILED java.lang.NoClassDefFoundError at ChangeTrackersTest.java:56

com.frostwire.jlibtorrent.EntryTest > testCreation1 FAILED java.lang.NoClassDefFoundError at EntryTest.java:54

com.frostwire.jlibtorrent.EntryTest > testSimpleCreation FAILED java.lang.NoClassDefFoundError at EntryTest.java:28

com.frostwire.jlibtorrent.VectorsTest > testByteVector2String FAILED java.lang.NoClassDefFoundError at VectorsTest.java:22

com.frostwire.jlibtorrent.TcpEndpointTest > testToString FAILED java.lang.NoClassDefFoundError at TcpEndpointTest.java:15

com.frostwire.jlibtorrent.StatsMetricTest > testListStatsMetric FAILED java.lang.NoClassDefFoundError at StatsMetricTest.java:17

com.frostwire.jlibtorrent.PriorityTest > testArray2vector FAILED java.lang.NoClassDefFoundError at PriorityTest.java:17

com.frostwire.jlibtorrent.FileStorageTest > testFileName FAILED java.lang.NoClassDefFoundError at FileStorageTest.java:18

19 tests completed, 18 failed

I found that no jlibtorrent-android-arm-w.x.y.z.jar in build/libs/ when I run swig/build-android-arm.sh. Please help. best regard.

gubatron commented 3 years ago

for the test to pass for android you would need to install the development environment on an android device. right now it isn't passing because you built an android binary and you might be running the test from Linux, Mac or Windows.

In other words, those tests aren't meant to test the android binaries. Sorry.