Rectangle 27 0

Libgdx, Transitive dependencies Android,Java library project, Jar?


Add it to the Libraries tab of the Android Project. ("Add jars", not "Add external jars") And then check it in the Order & Export tab aswell.

If the library is supported on Android, it will work.

If you get the Multiple dex files error. Uncheck private libraries in the Order & Export tab of the Android project.

Put it in the Core project's "libs" folder. Add it to its Order & Export tab.

That means that projects that depend on the main project will also have gdx.jar on their classpath. However, this doesn't work for Android projects.

This just means that the libraries in the classpath of the Core project aren't automatically added to the Android project (As far as I know, some time ago it did).

Note
Rectangle 27 0

Libgdx, Transitive dependencies Android,Java library project, Jar?


compile fileTree(dir: 'libs', include: '*.jar')
project(":android") {...

    dependencies {....
        compile fileTree(dir: '../libs', include: '*.jar')
    }
}
project(":core") {...

    dependencies {....
        compile fileTree(dir: 'libs', include: '*.jar')
    }
}

Android must have this line but it is not necessary for other projects.

line. If your libs folder is in core project's folder, add above line to

part of your build.gradle file. And add below line to your Android project's part in the build.gradle file.

Note