3

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
  • Building lib as a standalone project succeeds
  • package in AndroidManifest of either projects is the same
  • I tried to disable aapt2 (android.enableAapt2=false in gradle.properties) - no luck
  • May be relevant: Using Kotlin (1.2.21)

What 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.

kar
  • 741
  • 6
  • 16

1 Answers1

1

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')
kar
  • 741
  • 6
  • 16