Start a new topic

Wikitude Android application


I'm trying to make an android application using wikitude javascript API , on Android Studio.

I already set up Android Studio with wikitude, however I had some problems

first the application worked - worked as in I got the wikitude logo when I launch the application- but when I add a wikitude exmaple to the assets folder and write this piece of code in the .java file

this.architectView.load( "file:///android_assest/poi/index.html" );}
catch (IOException e) {

but It doesn't work ,the application doesn't recognize the image it is supposed to recognize, is there any thing I am missing?

one more thing is that I get an error in this line 

error: cannot find symbol variable architectView


Error:Execution failed for task ':app:compileDebugJavaWithJavac'.

> Compilation failed; see the compiler error output for details.

please help, I have looked everywhere for an answer, I have tried to look in SDKexample project but couldn't find anything related.


sorry for this but please ignore the second part of the question, I got the solution 

but the wikitude samples still don't work


Did you make sure to follow exactly the steps described here in the documentation regarding how to set up a project in Android studio?



Hello Eva, thank you for your reply

Yes I followed the instructions in the documentation.

Now I am trying to make the POI sample application I did everything that I'm supposed to do, the application works fine no errors except it keeps saying that it's trying to find where I am , at first I thought the app can't detect my place, but then I used the SDKExample application on the same phone and it works just fine, it can detect my place, show me POI ,POI with label,  multiple POIs 

so the problem is in my own app, but I can't find it.

In another forum you said please make sure that you implement a location strategy to trigger location updates by calling the architectView.setLocation().

 could you please tell me what do you exactly mean?


On Android the Wikitude SDK does not implement a location strategy to trigger location updates. This means that you have to implement this yourself and pass the location to the SDK by calling architectView.setLocation(). A sample implementation can be found in the AbstractArchitectCamActivity.



Thank you Eva,

but I have some questions,

1. where can I find architectView.setLocation() in which file because it's not in the AbstractArchitectCamActivity?

2. Now if I copy the AbstractArchitectCamActivity code into my java file I till have some errors where classes and variables cannot be resolved even though I imported all the packages, do I have to declare those variables anywhere else?


There are two ways that you can implement a strategy in order to trigger location updates. The first one is by passing the location to the SDK by calling architectView.setLocation(). If you open the file AbstractArchitectCamActivity and search for the term 'architectView.setLocation' then you will see an implemetation.

The second way is by using Google Location services. This is a documentation provided by Google demonstrating how to make your app location aware. In addition, you can refer to the code on github here regarding GoogleSamples with android play location and in this specific one regarding location updates.

I believe this is all the information you need in order to display your own POIs.




Thank you for your response,  

I have tried all the ways you recommended but with no success!

I'm a beginner in Android Application development so could you please explain to me what should I do

Now I copied the AbstractArchtictCamActivity and  ArchitectViewHolderInterface because AbstractArchtictCamActivity  implememnts it ,  and added them to the java resources in my application along with the , I debugged it and there are no errors , yet the application immediately crashes whenever I try to open it.

do I have to write any additional lines in the xml files or the mainactivity ?

would appreciate your help!


As this is not a technical issue related with our SDK products what I would recommend is that you start by viewing our documentation and all information provided there. Make sure you understand the Android development workflow and coding, before you start implementing your own app.


Ok, Thanks

Login or Signup to post a comment