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

Code 1 ;File not found error #466

Closed
harunme3 opened this issue Mar 12, 2021 · 3 comments
Closed

Code 1 ;File not found error #466

harunme3 opened this issue Mar 12, 2021 · 3 comments

Comments

@harunme3
Copy link

When do I install apk first time copyfile() method working as expected,but while I installed my app second time it give me File not found error

this.file .checkDir(root, 'target')
.then(() => {
this.file
.copyFile(dirctorypath, filename, root+'target', '')
.then((t) => {
console.log('saved');
})
.catch((err) => {
console.log(err);
console.log('File not found');
});
})
.catch((err) => {
//create nd copy
this.file
.createDir(root, 'target', true)
.then(() => {
this.file
.copyFile(dirctorypath, url, root + 'target', '')
.then((t) => {
console.log('saved');
})
.catch(() => {
console.log('not saved');
});
})
.catch(() => {
console.log(err);
});
});

@Jdonerme
Copy link

you might want to look at this thread: #426

Adding ' android:requestLegacyExternalStorage="true"' to my AndroidManifest.xml solved the problem for me

@harunme3
Copy link
Author

I already added this android:requestLegacyExternalStorage="true in my config.xml and AndroidManifest.xml.
Everything works fine but problem is when I installed my app second time,It gives me file not found error while copying file one location to other location(App directory).
But when I delete my App directory folder manually It work fine.

@timbru31
Copy link
Member

Thanks a lot for your issue, however this channel is for bug and feature requests, not for support. 😊
You can try asking on StackOverflow or in our Slack community.

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

3 participants