Skip to main content
Inspiring
March 31, 2016
Answered

Cfbuilder Android net::err_file_not_found (file:///android_asset/www/test1.cfm)

  • March 31, 2016
  • 1 reply
  • 5308 views

Hi All.

I have written a full application that works great using chrome http://localhost:8600/<appname>/

When i build to phone gap i got the error

Android net::err_file_not_found (file:///android_asset/www/xxxxxx.cfm

So i thought oh dam, what stuff did i mess up. This is my 1st App.

So i thought lets go back to basic.

So i created a new project.

I only created 2 pages index.cfm and test1.cfm

index.cfm

<html>

    <head>

    </head>

   

    <a href="./test1.cfm">test</a>

</html>

test1.cfm

<html>

    <head>

    </head>

   

    <a href="./index.cfm">index</a>

</html>

Then i built the app.

downloaded APK

installed on samsung note 3 aswell as samsung note 10.1

When i run the app. i see the hyperlink i click(touch) on test 1.

I then get the following error then app closes

Cfbuilder Android net::err_file_not_found (file:///android_asset/www/test1.cfm)

So what do i need to do from index.cfm to load other pages once built to android.

IAm I missing tags, java. something.

there is not more "back to basic" than i can get here

Any help would be great. Have a great eveing

This topic has been closed for replies.
Correct answer ShapeShifme

OK i have it figured out after a lot of testing.

Any page that want to link to another page requires the following on it

<cfclientsettings detectdevice="true" enabledeviceapi="true"/>

<cfclient>

    <cfscript>

    </cfscript>

</cfclient>

So my pages now look like this

index.cfm

<!doctype html>

<cfclientsettings detectdevice="true" enabledeviceapi="true"/>

<cfclient>

    <cfscript>

    </cfscript>

</cfclient>

<html>

    <head>

    </head>

   

    <a href="./test1.cfm">test 1</a>

   

</html>

test1.cfm

<!doctype html>

<cfclientsettings detectdevice="true" enabledeviceapi="true"/>

<cfclient>

    <cfscript>

    </cfscript>

</cfclient>

<html>

    <head>

    </head>

   

    <a href="./index.cfm">index</a>

   

    <br><br>

    <a href="./test3.cfm">test3</a>

</html>

I really hope this helps someone else.

have a great Day

1 reply

ShapeShifmeAuthorCorrect answer
Inspiring
April 2, 2016

OK i have it figured out after a lot of testing.

Any page that want to link to another page requires the following on it

<cfclientsettings detectdevice="true" enabledeviceapi="true"/>

<cfclient>

    <cfscript>

    </cfscript>

</cfclient>

So my pages now look like this

index.cfm

<!doctype html>

<cfclientsettings detectdevice="true" enabledeviceapi="true"/>

<cfclient>

    <cfscript>

    </cfscript>

</cfclient>

<html>

    <head>

    </head>

   

    <a href="./test1.cfm">test 1</a>

   

</html>

test1.cfm

<!doctype html>

<cfclientsettings detectdevice="true" enabledeviceapi="true"/>

<cfclient>

    <cfscript>

    </cfscript>

</cfclient>

<html>

    <head>

    </head>

   

    <a href="./index.cfm">index</a>

   

    <br><br>

    <a href="./test3.cfm">test3</a>

</html>

I really hope this helps someone else.

have a great Day