Start a new topic

Javascript SDK manual is incorrect?


I'm trying to follow the manual for this SDK but it keeps failing. This is the one i'm talking about:

In the following step i find one inconsistency:

  • "Copy the file libs/wikitudesdk.aar into the libs folder of your module. (<project-root>/<module-name>/libs)"


Then i tried the next step, adding the dependencies like so:


But get this  error.. I initialised the project with sdk version 18.

i just changed the last line to:
compile ''

Then i got more errors that it couldnt find wikitudesdk.aar in a couple directories. Then i added the .aar file to one of the directories and added a '-' to it (wikitudesdk-.aar) and now i get a new error:


Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 18 cannot be smaller than version 19 declared in library [:wikitudesdk:] C:\Users\robert\.gradle\caches\transforms-1\files-1.1\wikitudesdk-.aar\dc9bf5b22a0d9c55de972792925fa869\AndroidManifest.xml as the library might be using APIs not available in 18
  	Suggestion: use a compatible library with a minSdk of at most 18,
  		or increase this project's minSdk version to at least 19,
  		or use tools:overrideLibrary="com.wikitude.architectandlib" to force usage (may lead to runtime failures)


so next thing i did was change:

minSdkVersion 18

minSdkVersion 19
Now it says finally: build succesful!!


Alright! seems like i fixed some stuff.

I created a new class and called it "TheARActivity". Just an empty class that extends AppCompatActivity. Then put in the manifest:
<activity android:name="com.robert.wikitude_javascript_sdk_2.TheARActivity" android:configChanges="screenSize|orientation"/>

Now on to the next step:

"You have to include"

 <script src=""></script>

 In a html file, but i have no html files?? any idea where they are??

 I made my own with a webview according to this guide:

To no avail. Then i thought about just copying the sample app structure! This is going OK.

I now think i know where to put in the licence key, it tells me to visit this link to get a licence key:
But the website seems to be broken :(




If you want to download the trial license key then please follow the link here If you want to go to the documentation then please go here, find the platform you are working with and follow the Getting Started guide and Where I should enter the license key link.



Yes thanks sorry for the confusing messages, i already figured out how to do the key.

i got stuck on this step:


You have to include

 <script src=""></script>

in your HTML files to use the AR namespace and the architectView will handle them properly. To test an ARchitect World on a desktop browser, you must include ade.js tool instead to avoid JavaScript errors and see a development console. 

 i made an assets folder and put index.html in it. And then the script. Maybe it might work? i will try to proceed the guide


After some stressful hours managed to make a black screen appear with the wikitude and trial watermark. So i think it will work.

Thanks for your assistance, although i advice you to have someone walk through the tutorial and correct wherever it doesn't work anymore because it seems to be outdated for the newer Android studio versions.

 Good day! I'm sorry for reopening this but i couldnt find the solution on this forum.

i start my app and switch to the intent containing the architect view and it shows a nice splash screen on my phone with "trial" on the background and a wikitude logo.

When i look in my console i get:


resolveCameraResolution: This method may not be called when the camera is already running.
                                                                                  java.lang.RuntimeException: Fail to connect to camera service
                                                                                      at android.hardware.Camera.<init>(
                                                                                      at com.wikitude.architect.ArchitectView.loadingStarted(Native Method)
                                                                                      at com.wikitude.architect.ArchitectWebView.startLoading(ProGuard:520)
                                                                                      at com.wikitude.architect.ArchitectWebView.loadArchitectFileFromUrl(ProGuard:355)
                                                                                      at com.wikitude.architect.ArchitectView.load(ProGuard:972)
                                                                                      at com.robert.wikitude_javascript_sdk_2.TheARActivity.onPostCreate(
                                                                                      at android.os.Handler.dispatchMessage(
                                                                                      at android.os.Looper.loop(
                                                                                      at java.lang.reflect.Method.invoke(Native Method)



Please make sure that you have the required camera permissions (in the manifest and the runtime permissions) before calling onResume of the ArchitectView. 

Best Regards,


Yes thanks i changed it to minimum api 23 so it enables me to dynamically ask for permissions. Then i added this code:


if (ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA)
                != PackageManager.PERMISSION_GRANTED) {
            // Permission is not granted
            System.out.println("test3: you dont have permission");

            System.out.println("test4: hij request permission!");
                    new String[]{Manifest.permission.CAMERA},

            System.out.println("test5: it does something else?!");

 And voila! It asks for permission. I clicked yes and then it went back to the black  'trial' window. It doesnt give the error in the console anymore and when i try again it wont ask for permission anymore because i already gave it.


added some overrides and now it works! Thanks for support.

Note to people reading this that dont have much experience with Android: take into account that different API targets have different ways of handling the permissions.


Login or Signup to post a comment