I read elsewhere that this AppPreferences is not compatible with android 7.0.0+ and that there are other plugins that have issues too. With AppPreferences it is that the build folders do not seem to have the expected structure. So some files were not installed in the first place. When uninstalling the script tries to remove those files and fail.
I started a new project, moved my files and use the sqllite plugin instead.