title: Android Studio Build APK ClassNotFoundException
body: <p>My app is split in many projects, which are included as a dependency in my main library which is a dependency in my app.</p>
  
  <ul>
  <li><p>Project Main </p>
  
  <ul>
  <li>Module App<br>
  <ul>
  <li>Dependencies
  <ul>
  <li>MainLibrary Module</li>
  </ul></li>
  </ul></li>
  <li>Module MainLibrary
  <ul>
  <li>Dependencies<br>
  <ul>
  <li>Project X    </li>
  <li>Project Y   </li>
  </ul></li>
  </ul></li>
  </ul></li>
  <li><p>Project X</p>
  
  <ul>
  <li>Module 1</li>
  <li>Module 2   </li>
  </ul></li>
  <li>Project Y
  <ul>
  <li>Module 1</li>
  </ul></li>
  </ul>
  
  <p>My first problem is, that my dependency to Project X is not packaged in my APK Dex File and i get a ClassNotFoundException if the app starts and the class in this module is used.
  I declare the dependency with <strong>provided project(':beacon')</strong></p>
  
  <p>The second problem is, that i have to declare the dependencies in my MainLibrary Module and in my AppModule. Thats twice.</p>
  
  <p>Thank you for your help</p>