Reputation: 741
I'm struggling to update my project to compile with Android Gradle Plugin 3.0.1. Facts:
app
project depends on a local library: lib
./gradlew assembleDebug
for app
fails at compiling lib
with error Unresolved reference: R
lib
as a standalone project succeedspackage
in AndroidManifest
of either projects is the sameandroid.enableAapt2=false
in gradle.properties
) - no luckWhat am I missing? Seems pretty straightforward, yet I couldn't find the reason why R is not generated while building the app
, yet it is when building the lib
directly.
Upvotes: 3
Views: 4255
Reputation: 741
Turns out the problem was in using symlink to library directory. I modified settings.gradle
to point out to the right dir instead:
project(':lib').projectDir = new File('/path/to/the/lib')
Upvotes: 1