Start a new topic
Solved

Uncaught ReferenceError: AR is not defined

Hi,


I get the following error using the Android JS API 8.7

I/chromium: [INFO:CONSOLE(36)] "Uncaught ReferenceError: AR is not defined", source: file:///android_asset/scripts/ar2d.js (36)


Trying to pinpoint the problem, I exported the collection, I'm working on as an offline project, and it ran smoothly.

Then I copied the assets folder from my original project and the error returned. So I assume the problem is with either the html file, or the js file, but I can't see any meaningful difference between my project and any of the sample projects.


Any tips on what might went wrong are welcome.

js
(5.62 KB)
html
(631 Bytes)

Sorry, uploaded the wrong error message: it should be

I/chromium: [INFO:CONSOLE(40)] "Uncaught ReferenceError: AR is not defined", source: file:///android_asset/scripts/ar2d.js (40)

Solved:

Problem was with my head. Apperently at the start I typed in the URL to the architect.js, and since it's not a real URL, and the architect.js is packaged with the wikitudesdk.aar, the URL is sensitive to that "www.".

Solved after changing line 40 to <script src="https://www.wikitude.com/libs/architect.js"></script>

Login or Signup to post a comment