WebView
is being used with local .html
file which in turn includes local .js
files. Where to put .html
, .js
and probably other similar files in an Android Studio
project so that IDE would show me these files and IDE plugins such as auto-complete would work?
Things I have tried:
Assets
folder. Works but it is not recommended
as the assets cannot (and shouldn't) be updated once the app has been packaged and signed
but doesn't that mean that the next time I build .apk
file and the application is beings installed the assets will be replaces with anything that was in the assets folder in the new .apk
build?
res/raw
. Got that idea from here. Looks like it will work for.html
files but not for.js
as I am getting compilation error because of.js
file:'-' is not a valid file-based resource name character: File-based resource names must contain only lowercase a-z, 0-9, or underscore
/drawables/raw
. Does not seem to work at all although it was suggested here. First thing -Android Studio
does not even show these files if you put them in that directory (tried renaming to/drawable/raw
, note not a plural name) so that is an issue for me even if compilation would succeed. Second - if I put.html
and.js
files indrawable
I get:The file name must end with .xml or .png
Tried putting them in one of Java packages but could not get those files because it seems Android Java can not access files like plain Java does.