Start a new topic

Unable to open asset URL:

Unable to open asset URL:


Hello!

I'm trying to run the first Wikitude Sample "Client Recognition" in Android Studio. Everything seems to be working fine except in my phone nothing happens when I focus on the image (surfer), and on the top left corner of the phone I only get "Loading..."

Back in Android Studio I get the following three error messages:

- E/AndroidProtocolHandler: Unable to open asset URL: file:///android_asset/Samples/css/default.css

- E/AndroidProtocolHandler: Unable to open asset URL: file:///android_asset/Samples/js/imageontarget.js

- E/AndroidProtocolHandler: Unable to open asset URL: file:///android_asset/ade.js

 

This is what I have in the onPostCreate section of the Activity:

@Override
protected void onPostCreate(final Bundle savedInstanceState){
super.onPostCreate(savedInstanceState);

if (this.architectView != null){

this.architectView.onPostCreate();

try {

this.architectView.load("Samples/index.html");

}
catch (IOException e1){
e1.printStackTrace();
}
}
}

This is what I have from the index.html (which I copied from the sample files):


<!DOCTYPE HTML>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta content="width=device-width,initial-scale=1,maximum-scale=5,user-scalable=yes" name="viewport">

<title></title>

<script src="architect://architect.js"></script>
<script type="text/javascript" src="../ade.js"></script>

<link rel="stylesheet" href="css/default.css">
</head>

<body>
<div id="loadingMessage" class="info">Loading ...</div>

<script src="js/imageontarget.js"></script>
</body>
</html>

Could somebody please tell me what I'm doing wrong? I have been trying all sorts of things for the past day and haven't got any closer.

Thank you!


 

Hi David,

Are you following the Android set-up guide step by step and this happens without changing anything in the code?

Greetings

Nicola

 

Hello Nicola,

Thank you for your response. Yes I have been following the Android set-up guide step by step, which to be honest doesn't have much detail, lacks explanation, and is very difficult to follow, but yes I have done everything it says there, or so I think. Hence why I'm giving the code. If you could please suggest something that I can try or I might be doing wrong it would be greatly appreciatted.

Thank you.

 

David

Hi David,

the error messages are saying that you are missing some files. Check your asset folder if it contains Samples/css/default.css and Samples/js/imageontarget.js and ade.js. Make sure the case is correct too, is the folder "Samples" really upper case or maybe like in our example application lower case "samples"?

Best regards,
Simon

I have a similar problem, but in mine, he asks for a file that I don't have and I don't know why.

E/AndroidProtocolHandler: Unable to open asset URL: file:///android_asset/pointofinterestselectingpois/js/selectingpois.js


Login or Signup to post a comment