Jan Knoblauch
Jan Knoblauch

Reputation: 219

Java Apache Mina FTP Server import libraries

I want to create an Android FTP Server App with the Apache Mina FTP Server.

The problem is the following: I can't import these libraries.

I can select between two errors:

If the libs aren't selected in "Java Build Path"/"Order and Export", I get this error:

"Could not find class 'org.apache.ftpserver.FtpServerFactory' (...)" 

(Logcat)

If they are selected, I get this error:

Conversion to Dalvik format failed: 
Unable to execute dex: 
Multiple dex files define Lorg/apache/ftpserver/ftplet/FtpException;

(Problems / Errors)

What's wrong??

My imported libraries:

Upvotes: 1

Views: 1674

Answers (1)

Evgeni Lipatov
Evgeni Lipatov

Reputation: 326

I have the same issue with any android project when I add jCenter dependency on org.apache.ftpserver:ftpserver-core:1.0.6. Project compiles successfully, but it fails when I try to start it.

I realized, that ftpserver-core-1.0.6.jar contains classes from ftplet-api-1.0.6.jar.

To fix the issue, I used local libraries, but deleted ftplet-api-1.0.6.jar. I am not sure that it is totally correct solution, but it works for me.

Upvotes: 3

Related Questions