starter-kit icon indicating copy to clipboard operation
starter-kit copied to clipboard

Error: Duplicate resources

Open illi-homz opened this issue 2 years ago • 0 comments

Hello, i use starter kit and add Viro3DObject witch my resources

return (
    <ViroARScene onTrackingUpdated={onInitialized}>
      <ViroAmbientLight color={'#fff'} influenceBitMask={1} />

      <Viro3DObject
        source={require('./res/mycube/mycube.obj')}
        position={[0, -2, -4]}
        scale={[0.4, 0.4, 0.4]}
        type={'OBJ'}
        onDrag={() => {}}
        resources={[
          require('./res/mycube/mycube.mtl'), // <- problem here
          require('./res/mycube/canyon.jpg'),
          require('./res/mycube/buckle1.jpg'),
        ]}
      />
    </ViroARScene>
  );

and during build android studio returns exception:

Execution failed for task ':app:mergeReleaseResources'.
> [raw/res_mycube_mycube] /home/il/projects/starter-kit/android/app/build/generated/res/react/release/raw/res_mycube_mycube.mtl	[raw/res_mycube_mycube] /home/il/projects/starter-kit/android/app/build/generated/res/react/release/raw/res_mycube_mycube.obj: Error: Duplicate resources

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

if remove line require('./res/mycube/mycube.mtl') then build is success, but resources are not added to the object: mtl file doen't get into the apk build

I got this error both in my project and starter-kit project

illi-homz avatar Jun 15 '22 07:06 illi-homz