Skip to content Skip to sidebar Skip to footer

Android Studio Library Project Dependencies

I have imported an Android Studio project as a library for another of my projects. My original question for that is here. It worked excellently for a while, until today. Today I fi

Solution 1:

If your CES project still has this dependency, then it looks fishy:

compile project(':Util')

It works best if your dependency statements use the same paths as what appears in settings.gradle, to wit:

compile project(':Eed:libraries:Overt:Util')

I don't know if you can build up a relative Gradle project path to refer to a sibling project at the same level as the referring project. What I mean is that CES and Util are both at the same level, :Eed:libraries:Overt:, what what you really want is something like what you can do in a filesystem path with ../Util, but I don't know offhand if that's possible in Gradle.

It could be that if you're expecting your complex module to be able to be imported somewhere and still maintain its module relationships with relative paths, you may be asking a lot. Having said that, if it's a firm requirement, then you can look into remapping directories in settings.gradle via projectDir. See Gradle subproject name different than folder name for a hint on how to get started with that if you want to go that route.

Post a Comment for "Android Studio Library Project Dependencies"