What does file:///android_asset/www/index.html mean?

后端 未结 6 812
情书的邮戳
情书的邮戳 2020-12-05 00:35

I want to know what does file:/// mean while loading a html file from the assets folder in android

Is it an absolute path name which points to the root

6条回答
  •  有刺的猬
    2020-12-05 01:16

    It took me more than 4 hours to fix this problem. I followed the guide from http://docs.phonegap.com/en/2.1.0/guide_getting-started_android_index.md.html#Getting%20Started%20with%20Android

    I'm using Android Studio (Eclipse with ADT could not work properly because of the build problem).

    Solution that worked for me:

    1. I put the /assets/www/index.html under app/src/main/assets directory. (take care AndroidStudio has different perspectives like Project or Android)

    2. use super.loadUrl("file:///android_asset/www/index.html"); instead of super.loadUrl("file:///android_assets/www/index.html"); (no s)

提交回复
热议问题