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


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.

 

Jan Robert

Hi,
The error message can't be the same for iOS and Android. Please be specific because details matter!
 

Maybe you're missing `cordova platform update android@5.0.0` or `cordova platform add android@5.0.0` on Android.

Best regards

Andreas

Hi Jan,

what iOS device and iOS version are you using?

Thank you and best regards,
Simon

Hi Simon,

An iPhone 5s / iOS 8.3

I discovered the app does work when launched from the CLI or from the phone. But crashes each time in Xcode (6.4) when you load an ARchitect World. I've tries it with many test apps, keep having the same problem.

using Cordova 5.0.0

Jan Robert

Hello,

I'm having the similar build errors:


:compileDebugJava
C:Users\rolf\Documents\Cordova\wikitude\platforms\android\src\com\wikitude\phonegap\WikitudePlugin.java:754:
error: cannot find symbol
((CordovaWebView)rootView).clearFocus();




 

Tried several setups on two machines without success:


- Windows 7 and Windows 8.1

- Java: 1.7u79,  1.8u45 and 1.8u51

- cordova: 5.1.1

- com.wikitude.phonegap.WikitudePlugin 4.1.0

- cordova Installed platforms: android 4.0.2

- android:targetSdkVersion: 19 and 22


Other projects without the Wikitude-Plugin compile without errors.

I could not deploy the example app because the sh-script is not executed on windows.


What can I try to change?

 


Regards,

 

    Rolf

I've been following the online guide here:
http://www.wikitude.com/external/doc/documentation/latest/phonegap/setupguidecordovacli.html
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 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

            ((CordovaWebView)rootView).getView().clearFocus();

                                      ^

      symbol:   method getView()

      location: class CordovaWebView

    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? 

hi Simon,

I am using windows, how do I build the sample app?

Besides, whatever how I try to build the android app, the same errors still occured.

Hi,

@Jan: Your problem is very strange, I'll will need to talk to our iOS dev team, and come back to you later.

@Rolf: You are using the latest Cordova version but not our latest plugin version. Please upgrade to our latest plugin version (master on github: https://github.com/Wikitude/wikitude-cordova-plugin) or downgrade to Cordova 4.x.

@Fredrick: If you download the sample app from https://github.com/Wikitude/wikitude-phonegap-samples/archive/master.zip there is a .cmd file contained which will do the automatic setup on Windows. Please consult the readme.md (also contained) for the exact command you need to use.

Thank you and best regards,
Simon

 

Hello Simon,

thanx for the quick response.

I thought I had the latest version, but with reinstalling plugin version 4.1.0-3.1.0 I now have no build errors anymore. (The included CHANGELOG still states "4.1.0-3.0.0"?!)

The .cmd-File for the Samples-App-Setup tries to execute a .sh-command which does not work on windows.

Regards, 

   Rolf

Solution found.

If someone has the same problem with me, getting "shell.js: internal error", then try to download the wikitude-cordova-plugin zip file, unzip it on local, and then cordova plugin add "to local path". It will be fine. 

If still getting problems, then may uninstall the cordova with npm -g, and then install cordova again.

 

Hi Andreas, y wrote '$ cordova build' in my Terminal and the results is that error. The error is for Android.

 

Regards.

Hi,
When you read carefully through your shell output, It clearly states the problem: "Command failed with exit code 1. You may not have the required environment or OS to build this project."

So whats your setup? Which OS do you have on your computer? have you installed the Android SDK? Which Android SDK do you have installed?

Are you able to build any other Android project on your computer?

Best regards

Andreas

Hi Simon... I have the same problem in iOS when I try to build the app. I try some solutions of this post... and nothing.

This is my screen, I hope you can help me.



Version of Cordova: 5.4.1

Version android: 4.1.1

Version iOS: 3.9.2

 

Thank's, regards.

Hi Yahair,
Do you try to build for iOS or Android. In your text you write iOS, but the console output is Android.
Do you try to build the example application or your own application?

Best regards

Andreas
Login or Signup to post a comment