Skip to content

[Android] Duplicate Class Error #17

@towhid135

Description

@towhid135

Works fine on IOS but on android it throws a duplicate class error. I have tried on Android studio but it couldn't detect the file from where the error raised.

My React-native environment:
"react-native": "^0.70.6"
"react-native-cloud-fs":^2.7.0
android gradle plugin version: 7.2.2
Gradle-version- 7.5.1


React Native Code:

const IcloudBackUp = () => {
const onPressHandler = async () => {
try {
// Store it on the FS first
const path = ${RNFS.DocumentDirectoryPath}/${filename};
await RNFS.writeFile(path, 'Lorem ipsum dolor sit amet', 'utf8');

  const sourceUri = {path};
  const mimeType = 'text/plain';
  const result = await RNCloudFs.copyToCloud({
    mimeType,
    scope,
    sourcePath: sourceUri,
    targetPath: destinationPath,
  });
  console.log('Result of setting items to iCloud', result);
} catch (error) {
  console.log('Error in setting items to iCloud', error);
}

};


app/build.gradle:
//Added this
compile ('com.google.android.gms:play-services-drive:10.2.0') {
force = true;
}
//Tried with implementation also
compile ('com.google.android.gms:play-services-drive:10.2.0') {
force = true;
}


IOS setup is same as described in the documentation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions