Software Archive
Read-only legacy content
17061 Discussions

file:///android_asset/www/index.html error in intel xdk

BlueYeti
Beginner
18,322 Views

I build my app in intel xdk and when with corodova and html-5. When I finally build it via crosswalk.....and installed on android. It shows "file:///android_asset/www/index.html ", error but if I again re-open app after closing it...it works fine. 
I dig in to the internet and found some solution 

1)  WebView article = (WebView) findViewById(R.id.article_webview);
 article.loadDataWithBaseURL("file:///android_asset/www/index.html", null, "text/html", "UTF-8", null );
and 

2)   <platform name="android"><preference name="loadUrlTimeoutValue" value="700000" />

But where should I write above code. In index html or where. It is an offline app and when I open my app after it is build with renaming it to .apk to .zip, there is config.xml file, but when i edit it.....It appears that it is been encrypted already. 
Can anyone help me.

0 Kudos
1 Reply
PaulF_IntelCorp
Employee
18,322 Views

It is unclear what the problem is that you are encountering, and what the solution is. Sorry, but the information you're providing is vague and difficult to follow.

Regarding making edits to your config.xml file, you cannot modify any files inside your APK, that is a "built signed app package," it's "too late" to try to change anything in there, that's the final output. The build options for a Cordova app are inside the config.xml file. This is a project file, that fact that you see it inside your APK is just an artifact of the build process, it's not used in the APK, it's just there because it was left there as a result of the build.

If you use the "Cordova Build Package" tool to create a ZIP project that you can upload to PhoneGap Build, it contains a config.xml options file, inside the ZIP. You can open that zip, modify that config.xml, rezip the package and submit it to PhoneGap Build. Try that to see if you are able to make the change you are trying to make to the config.xml file.

There is not much point to trying to build new projects with the XDK, because our build system will be turned off at the end of June, so you should start learning how to build with PhoneGap Build or with Cordova CLI ASAP!!!

0 Kudos
Reply