Android Question Simple Library Compiler: "package does not exist"

JiggyMan

Member
Licensed User
Longtime User
I've used the tutorial for creating some simple B4A libraries without any problems. They didn't do much, I just wanted to make sure I understood how to do it.

Now I'm working on a real project and I've run into a snag. I downloaded the Apache Commons IO library and referenced it in my Eclipse project (Build Path > Configure Build Paths > Libraries > Add External JAR). I then imported it into my project:
Code: Copy
import org.apache.commons.io.*;

I used the FileUtils class of this library in my project. Eclipse doesn't show any errors or warnings regarding the way I've used it but when I try to compile it with the Simple Library Compiler (great tool!), I get the following message:
Starting step: Compiling Java code.
javac 1.8.0_45
D:\eclipse_proj\forecast\src\com\frigginjiggy\forecast\Update.java:5: error: package org.apache.commons.io does not exist
import org.apache.commons.io.*;
^
1 error
Can someone tell me if I've missed something, or done something wrong?
 
add a line
Code: Copy
@DependsOn(values={"commons-io-2.4"})
and copy the file commons-io-2.4.jar to your additional libraries dir
 
Upvote 0
Yep, that did the trick. Somehow I totally missed that line when I read the tutorial. Thanks, Erel.
 
Upvote 0
Back
Top