Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] Duplicate Class Error #17

Open
towhid135 opened this issue Jan 8, 2023 · 0 comments
Open

[Android] Duplicate Class Error #17

towhid135 opened this issue Jan 8, 2023 · 0 comments

Comments

@towhid135
Copy link

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

stvkoch pushed a commit to stvkoch/react-native-cloud-fs that referenced this issue Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant