I am currently developing an Android App using Android Studio 1.2 .
I want to use an external Java Project as a Dependency in my Android App. This Java Project is a Mave
I found the answer. You need to have Maven installed. Then you build the external project with maven. (you can use e.g. eclipse)
After that, the whole project can be found in your 'local maven repository'. The location is /{USER}/.m2/repository
on a Windows machine.
Follow the structure to the project, you've just built.
Convert this path to a name space path:
/{USER}/.m2/repositoryorg/tuda/cdc/pp/classes/1.0
is converted to
org.tuda.cdc.pp:classes-plain:1.0
Pay attention to the double points at the end.
Now add the maevnLocal() thing to you project's grandle file:
allprojects {
repositories {
jcenter()
mavenLocal()
}
}
And then add the following to your app's grandle file under dependencies:
compile 'org.tuda.cdc.pp:classes-plain:1.0'
Then you need to rebuild / sync the project with the changes of the grandle file. After that you are good to go.