title: More than one file was found with OS independent path 'lib/armeabi-v7a/libarcore_sdk_jni.so'
body: <p>I know there is a few similar questions on SO, but it does not work for me...</p>
  
  <p>I created Android lib, that use ArCore. It was a question on SO how to don't include .so file if I use created ndk lib? There is also one answer that sounds right </p>
  
  <p><a href="https://stackoverflow.com/a/58963852/5709159">https://stackoverflow.com/a/58963852/5709159</a></p>
  
  <p>But after I putted <code>libarcore.so</code> files under my <code>jniLib</code> </p>
  
  <p><a href="https://i.stack.imgur.com/ZEoEy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZEoEy.png" alt="enter image description here"></a></p>
  
  <p>I got such error</p>
  
  <blockquote>
    <p>More than one file was found with OS independent path 'lib/armeabi-v7a/libarcore_sdk_jni.so'</p>
  </blockquote>
  
  <p>So, I tried to fix it this ways</p>
  
  <p><a href="https://stackoverflow.com/a/44962630/5709159">https://stackoverflow.com/a/44962630/5709159</a></p>
  
  <pre><code>sourceSets.main {
          jniLibs.srcDir 'src/main/jniLibs'
          jni.srcDirs = [] //disable automatic ndk-build call
      }
  </code></pre>
  
  <p><a href="https://stackoverflow.com/a/56453718/5709159">https://stackoverflow.com/a/56453718/5709159</a></p>
  
  <pre><code>packagingOptions {
      pickFirst 'src/main/jniLibs/arm64-v8a/libarcore_sdk_jni.so'
      pickFirst 'src/main/jniLibs/armeabi-v7a/libarcore_sdk_jni.so'
      pickFirst 'src/main/jniLibs/x86/libarcore_sdk_jni.so'
      pickFirst 'src/main/jniLibs/x86_64/libarcore_sdk_jni.so'
  }
  </code></pre>
  
  <p>then this</p>
  
  <pre><code>packagingOptions {
      pickFirst 'lib/arm64-v8a/libarcore_sdk_jni.so'
      pickFirst 'lib/armeabi-v7a/libarcore_sdk_jni.so'
      pickFirst 'lib/x86/libarcore_sdk_jni.so'
      pickFirst 'lib/x86_64/libarcore_sdk_jni.so'
  }
  </code></pre>
  
  <p>and also this 
      packagingOptions {
          exclude 'lib/arm64-v8a/libarcore_sdk_jni.so'
          exclude 'lib/armeabi-v7a/libarcore_sdk_jni.so'
          exclude 'lib/x86/libarcore_sdk_jni.so'
          exclude 'lib/x86_64/libarcore_sdk_jni.so'
      }</p>
  
  <p>Nothing helped. </p>
  
  <p>As far as I understand issue is - I have one copy of <code>arcore.so</code> files under my <code>jniLibs</code> dir and one copy created after <code>Build</code> here</p>
  
  <p><a href="https://i.stack.imgur.com/lIFy9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lIFy9.png" alt="enter image description here"></a></p>
  
  <p>So, how to fix it?</p>