title: Specify different path for assets and resources folders - Android Studio
body: <p>I need to build my project with the option to use different assets and resources folders. So instead of manually replacing the assets and resources folders, I want to know if there is any way in gradle.build or any library to specify the path of those folders. </p>
  
  <p>I came across <a href="https://developer.android.com/studio/build/build-variants.html" rel="nofollow noreferrer">this</a> article which refer something about different flavors. Is this the right approach? If yes, how can I change the paths of the folders?</p>
  
  <pre><code>productFlavors {
      flavor2 {
      }
      flavor1 {
      }
  }
  
  sourceSets{
  
      flavor2 {
          resources.srcDirs = ['src/flavor2/java','src/commonFiles/java']
          assets.srcDirs = ['/mybuilds/f2assets']
          res.srcDirs = ['res-flavor2','res']
      }
  
      flavor1 {
          resources.srcDirs = ['src/flavor2/java','src/commonFiles/java']
          assets.srcDirs = ['/mybuilds/f1assets']
          res.srcDirs = ['res-flavor1','res']
      }
  
  }
  </code></pre>
  
  <p>I am not sure how to use the different paths. Why "resources.srcDirs" has 2 paths?</p>