title: Android Flavor Testing .R-file
body: <p>I have a problem with the .R-files of an app with 2 flavors:
  "main" and "flavor1"</p>
  
  <p>In "main" there is the common codebase. In "flavor1" there is some flavor-specific implementation.</p>
  
  <p>and I have 2 test directories:
  androidTest (package org.myapp.test)
  androidTestFlavor1 (package org.myapp.flavor1.test)</p>
  
  <p>In androidTest there is the common test codebase including resource files. In androidTestFlavor1 there are only tests specific to this flavor.</p>
  
  <p>Now, I have the problem that when I execute the tests in androidTestFlavor1, Android Studio complains that it cannot find the .R-file of the common test codebase (which is imported and used only in the androidTest-directory) - "cannot resolve symbol R".</p>
  
  <p>Obviously, the file org.myapp.test.R was not generated. Only org.myapp.flavor1.test.R was generated. Why is there only one .R-file generated? I thought the .R-file in the common directory should always be generated?</p>