For the past few hours I've been trying to import a rather large eclipse ADT workspace (8 projects, 1 app) into Android Studio. I've managed to fix or bypass most of the errors which have popped up so far, but now a problem's arisen which I do not know how to fix.
I have a Java Library module (Toolkit
), which has a JAR library dependency (commons-io-3.3.jar, as file dependency). Alongside this module I have an Android module which requires this JAR file (located as dependency within the Java Library Module), but I get an error: Error:(31, 29) package org.apache.commons.io does not exist
. However, the module dependencies from the Android module show Toolkit
as a module dependency.
So my question, in short, is this: In Android Studio, how can I use a JAR library in a Java module within an Android module? Or is there something else which I am doing wrong?
Edit:
build.gradle from Toolkit
apply plugin: 'java'
dependencies {
compile files('libs/commons-io-2.4.jar')
}
build.gradle from AndroidToolkit
apply plugin: 'com.android.library'
android {
// ...Android config stuff
}
dependencies {
compile project(':toolkit')
compile 'com.android.support:support-v4:18.0.0'
}