f18nfz commented on issue #761: URL: https://github.com/apache/cordova-plugin-camera/issues/761#issuecomment-1420770371
> > Try adding this to your config.xml file: > > `<preference name="AndroidInsecureFileModeEnabled" value="true" />` > > See here: https://cordova.apache.org/announcements/2021/07/20/cordova-android-10.0.0.html > > (then I removed and re-added platform android) It worked for me. > > What do you mean "removed and re-added"? > > I tried `cordova platform remove android && cordova platform add android` after modifying config.xml, but it didn't work - still getting that "Not allowed to load local resource" error. Am I doing it wrong? cordova-android `^10.1.2` I believe he means the same as you did (to remove and re-add the android platform via Cordova CLI). I would expect you just need to make sure that the '<preference ... ' line is present in the project root config.xml and then use the command 'cordova prepare' then you should then see it added automatically to the Android config.xml file within the android project (platforms > android > app > src > main > res > xml > config.xml). If you can see it there you can then build the project ('Cordova build') and it should work. Personally I use a combination of Cordova CLI and Android Studio, so I manually added the '<preference ...' line into the config file within ('project name' > platforms > android > app > src > main > res > xml > config.xml) then used Android Studio to 'clean' and 'rebuild' the project. ('Cordova Prepare' and 'Cordova Build' commands would do the same sort of thing). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
