Start a new topic

Help! Cordova 5.1.1 Android build errors with Wikitude plugin

Help! Cordova 5.1.1 Android build errors with Wikitude plugin

I've been following the online guide here:
Note: I'm using the open-source Apache Cordova (5.1.1), NOT the Adobe PhoneGap variant.

- Created an empty Cordova project which builds and deploys to a Nexus 4 phone OK.
- Added the Wikitude plugin:
$ cordova plugin add
- Added license key to line 12 of WikitudePlug.js
- $ cordova run android
Build fails with following errors:

    Compiling 3 source files to C:Users\me\Desktop\PROJECTS\Fizz AR project\fizzARdemo\platforms\android\ant-build\classes

    C:\Users\me\Desktop\PROJECTS\Fizz AR project\fizzARdemo\platforms\android\src\com\wikitude\phonegap\ error: cannot find symbol



      symbol:   method getView()

      location: class CordovaWebView

    C:\Users\me\Desktop\PROJECTS\Fizz AR project\fizzARdemo\platforms\android\src\com\wikitude\phonegap\ error: method handleResume in class CordovaWebView cannot be applied to given types;



      required: boolean,boolean

      found: boolean

      reason: actual and formal argument lists differ in length

    2 errors

ERROR running one or more of the platforms: Error: cmd: Command failed with exit code 1

You may not have the required environment or OS to run this project

This should be simple, right?

I've googled around for solutions without success.
Can anybody help me get this working please? 

I got the same problem on Android. There is no problem on iOS. 


this error occures if you use our latest plugin with Cordova lower than 5.x. Are you absolutely sure you are using Cordova 5.x? Might there be an older and newer Cordova version installed and you are accidently using the older?

Best regards,

It is Version 5.1.1

Mine is 5.1.1 also, Frederick.

Either nobody's using Android or nobody gives a monkey's about it at Wikitude. I gave up.

I'm now using a Unity/Vuforia solution which works.

Wikitude technical team is working on it now I think.

Hi again,

were your projects created with an pre 5.x Cordova version?

Please navigate to the root of your project on the command line and run the following command: cordova platform version android
Is the android platform version > 4?

Thank you and best regards,

Installed platforms: android 4.0.2

Available platforms: amazon-fireos, blackberry10, browser, firefoxos, windows, w

indows8, wp8

Ran the command. It's reporting:

Installed platforms: Android 3.7.1
Available platforms: amazon-fireos, blackberry10, browser, firefoxos, windows, windows8, wp8

Thank you both.

@John: You have the latest version of Cordova installed but your project still uses the old cordova android lib. Your Android project ist still an Eclipse project right? New projects now use Android Studio, so I hope the following will work. Please backup your current project and run: "phonegap platform update android" in the root of your project.

@Fredrick: Your version is the current, and should work. I'm not sure what the problem is. You do have the exact same problem as John right? I'm just asking because the screenshot you posted shows some other error. Could you please run our sample app setup script and see if this app runs? I'll post the instructions below.

Automatic Setup of Sample App

Download the binary of the Sample App from GitHub

Unzip the binary file (

Open the console and change to the directory where you unzipped the binary

In the console run the script. Use the -d flag to specify where the Sample App should be created. The -ios and -android flags control which platform should be compiled after creating the app.

$ ./ -d ~/Path/Where/The/App/Should/Be/Created -ios true -android true


This may take a while (more than one minute) without any update message in the command line, depending on how fast the plugin is cloned from GitHub and downloaded (more than 30MB)

The script might run for some minutes without feedback as it is downloading more than 30MB from GitHub. It will finish with the following success message:


$ *** DONE - SUCCESS ***

Open the project in Xcode (iOS) or Android Studio (Android) and run it on your device.


Many thanks Simon,

No errors now. That seems to have worked; except that, since I am using Cordova rather than PhoneGap, the correct command is: 

cordova platform add android@4.0.2

Before I found that out, I also ran the following update in the Android SDK folder (which at least doesn't seem to have done any harm!):

toolsandroid update sdk --no-ui 

Hi John,

I'm glad it's working for you now. If you have any further questions, please let us know.

Thank you and best regards,

Hi Simon,

I'm afraid I also can't get the sample app to work on iOS. The installed platforms for the sample app are iOS 3.8.0.

Cordova version: 5.1.1

Xcode 6.4

I ran through your posted steps and used the shell script: $ ./ -d ~/Path/Where/The/App/Should/Be/Created -ios true -android true

No succes. The app starts up fine, but the buttons don't work.


Jan Robert

Hi Jan,

what iOS device and iOS version are you using?

Thank you and best regards,
Login or Signup to post a comment