[Bug] already added DefaultSocketFactory

Jost aus Soest

Active Member
Licensed User
Longtime User
I'm getting this exception while compiling:
B4X:
java.lang.IllegalArgumentException: already added: Lorg/apache/commons/net/DefaultSocketFactory;
   at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:123)
   at com.android.dx.dex.file.DexFile.add(DexFile.java:163)
   at com.android.dx.command.dexer.Main.processClass(Main.java:486)
   at com.android.dx.command.dexer.Main.processFileBytes(Main.java:455)
   at com.android.dx.command.dexer.Main.access$400(Main.java:67)
   at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:394)
   at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:245)
   at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:131)
   at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:109)
   at com.android.dx.command.dexer.Main.processOne(Main.java:418)
   at com.android.dx.command.dexer.Main.processAllFiles(Main.java:329)
   at com.android.dx.command.dexer.Main.run(Main.java:206)
   at com.android.dx.command.dexer.Main.main(Main.java:174)
   at com.android.dx.command.Main.main(Main.java:95)
1 error; aborting
   Standard dexer.

I think the problem is caused by referencing these two libs in the same project:
- Net for SMTP (i. e. send mail, http://www.b4x.com/forum/additional...92-new-net-library-android-ftp-smtp-pop3.html)
- wPOP for extended POP3 (i. e. get mail states, http://www.b4x.com/forum/libraries-developers-questions/13309-extending-pop3-library.html)

So, how can I resolve this issue?
 

Jost aus Soest

Active Member
Licensed User
Longtime User
Thanks Erel, now it works like a charm! :sign0060:

Now I must only memorize, that using wPOP in a new project needs Net... ;)
 
Top