- Created an empty Cordova project which builds and deploys to a Nexus 4 phone OK. - Added the Wikitude plugin: $ cordova plugin add https://github.com/Wikitude/wikitude-cordova-plugin.git - 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\WikitudePlugin.java:756: error: cannot find symbol
C:\Users\me\Desktop\PROJECTS\Fizz AR project\fizzARdemo\platforms\android\src\com\wikitude\phonegap\WikitudePlugin.java:771: error: method handleResume in class CordovaWebView cannot be applied to given types;
((CordovaWebView)rootView).handleResume(true);
^
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?
F
Frederick Chung
said
over 8 years ago
I got the same problem on Android. There is no problem on iOS.
S
Simon 248601
said
over 8 years ago
Hi,
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, Simon
F
Frederick Chung
said
over 8 years ago
It is Version 5.1.1
J
John Gibbons
said
over 8 years ago
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.
F
Frederick Chung
said
over 8 years ago
Wikitude technical team is working on it now I think.
S
Simon 248601
said
over 8 years ago
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, Simon
F
Frederick Chung
said
over 8 years ago
Installed platforms: android 4.0.2
Available platforms: amazon-fireos, blackberry10, browser, firefoxos, windows, w
@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.
Unzip the binary file (wikitude-phonegap-samples-master.zip)
Open the console and change to the directory where you unzipped the binary
In the console run the CreateSampleApp.sh 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.
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.
Done
J
John Gibbons
said
over 8 years ago
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
S
Simon 248601
said
over 8 years ago
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, Simon
J
Jan Robert Leegte
said
over 8 years ago
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: $ ./CreateSampleApp.sh -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.
John Gibbons