Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails #105

Closed
patrickhofer opened this issue Jan 18, 2016 · 13 comments

Comments

@patrickhofer
Copy link

commented Jan 18, 2016

I followed exactly the tutorial here: http://www.wikitude.com/developer/documentation/phonegap but when i run cordova build i get this error.

wikitude/phonegap/WikitudePlugin.java:263: error: cannot find symbol
                        if ( !cordova.hasPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) ) {
                                     ^
  symbol:   method hasPermission(String)
  location: variable cordova of type CordovaInterface
/Users/patrickhofer/AugmentedRealityProject/platforms/android/src/com/wikitude/phonegap/WikitudePlugin.java:265: error: cannot find symbol
                            WikitudePlugin.this.cordova.requestPermission(WikitudePlugin.this, WRITE_TO_EXTERNAL_STORAGE_REQUEST_CODE, Manifest.permission.WRITE_EXTERNAL_STORAGE);
                                                       ^
  symbol:   method requestPermission(WikitudePlugin,int,String)
  location: variable cordova of type CordovaInterface
/Users/patrickhofer/AugmentedRealityProject/platforms/android/src/com/wikitude/phonegap/WikitudePlugin.java:462: error: cannot find symbol
            boolean cameraPermissionRequestRequired = !cordova.hasPermission(Manifest.permission.CAMERA);
                                                              ^
  symbol:   method hasPermission(String)
  location: variable cordova of type CordovaInterface
/Users/patrickhofer/AugmentedRealityProject/platforms/android/src/com/wikitude/phonegap/WikitudePlugin.java:463: error: cannot find symbol
            _locationPermissionRequestRequired = !cordova.hasPermission(Manifest.permission.ACCESS_FINE_LOCATION) && !cordova.hasPermission(Manifest.permission.ACCESS_COARSE_LOCATION);
                                                         ^
  symbol:   method hasPermission(String)
  location: variable cordova of type CordovaInterface
/Users/patrickhofer/AugmentedRealityProject/platforms/android/src/com/wikitude/phonegap/WikitudePlugin.java:463: error: cannot find symbol
            _locationPermissionRequestRequired = !cordova.hasPermission(Manifest.permission.ACCESS_FINE_LOCATION) && !cordova.hasPermission(Manifest.permission.ACCESS_COARSE_LOCATION);
                                                                                                                             ^
  symbol:   method hasPermission(String)
  location: variable cordova of type CordovaInterface
/Users/patrickhofer/AugmentedRealityProject/platforms/android/src/com/wikitude/phonegap/WikitudePlugin.java:468: error: cannot find symbol
                this.cordova.requestPermissions(this, CAMERA_PERMISSION_REQUEST_CODE, new String[] { Manifest.permission.CAMERA, Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION });
                            ^
  symbol:   method requestPermissions(WikitudePlugin,int,String[])
  location: variable cordova of type CordovaInterface
/Users/patrickhofer/AugmentedRealityProject/platforms/android/src/com/wikitude/phonegap/WikitudePlugin.java:470: error: cannot find symbol
                this.cordova.requestPermission(this, CAMERA_PERMISSION_REQUEST_CODE, Manifest.permission.CAMERA);
                            ^
  symbol:   method requestPermission(WikitudePlugin,int,String)
  location: variable cordova of type CordovaInterface
/Users/patrickhofer/AugmentedRealityProject/platforms/android/src/com/wikitude/phonegap/WikitudePlugin.java:473: error: cannot find symbol
                this.cordova.requestPermissions(this, CAMERA_PERMISSION_REQUEST_CODE, new String[] { Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION });
                            ^
  symbol:   method requestPermissions(WikitudePlugin,int,String[])
  location: variable cordova of type CordovaInterface
/Users/patrickhofer/AugmentedRealityProject/platforms/android/src/com/wikitude/phonegap/WikitudePlugin.java:993: error: method does not override or implement a method from a supertype
    @Override
    ^
9 errors
:compileDebugJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileDebugJava'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or                                                                    --debug                                                                option to get more log output.

@AndreasSchacherbauerWikitude

This comment has been minimized.

Copy link
Contributor

commented Jan 20, 2016

Android runtime permission require an installed Android SDK of API level 22/23. Can you please make sure that your Android SDK/NDK is up-to-date?

@nilebma

This comment has been minimized.

Copy link

commented Jan 23, 2016

I have exactly the same error here. My Android SDK and NDK are up-to-date, and I can build my project when I remove the wikitude plugin. Thanks :-)

@sinclairt

This comment has been minimized.

Copy link

commented Jan 25, 2016

I'm having the same problem, Android is up to date.

@TheCell

This comment has been minimized.

Copy link

commented Jan 25, 2016

Same Issue here I already reinstalled phonegap and cordova.

@AndreasSchacherbauerWikitude

This comment has been minimized.

Copy link
Contributor

commented Jan 25, 2016

Which versions of the Android SDK do you use?

@TheCell

This comment has been minimized.

Copy link

commented Jan 25, 2016

SDK 23 (Android 6) just updated before using. When Building a cordova App it runs through but adding the repo to the empty project and building it again gives me this error. Does your Plugin only have the hasPermissions method if the SDK is > Android 4.4?

@nilebma

This comment has been minimized.

Copy link

commented Jan 25, 2016

I tried to build my app by targeting API version 19, 22 and 23, and got the same error each time.

@AndreasSchacherbauerWikitude

This comment has been minimized.

Copy link
Contributor

commented Jan 26, 2016

nilebma made me aware of something: Is everyone trying to build it's own app and not our example app? If so, make sure that your cordova/phonegap command for android is either cordova platform add android@5.0.0 or cordova build android@5.0.0. Our example app generation script contains the version specifier which ensures that all required runtime permissions functions and constants are available. Might be that you need to update your cordova/phonegap installation.

I hope this helps

@TheCell

This comment has been minimized.

Copy link

commented Jan 26, 2016

Hey there I was able to build the app with that.
I made a new app and did cordova platform add android@5.0.0 after that I was able to add the wikitude plugin via github and was able to build the app with cordova build android

@AndreasSchacherbauerWikitude

This comment has been minimized.

Copy link
Contributor

commented Jan 26, 2016

(y) I'm glad we found the problem! Have fun using our Plugin!

@AndreasSchacherbauerWikitude

This comment has been minimized.

Copy link
Contributor

commented Jan 26, 2016

cordova platform update android@5.0.0 is also an option

@nilebma

This comment has been minimized.

Copy link

commented Jan 26, 2016

Great ! It works for me, thank you 👍

@Tazaf

This comment has been minimized.

Copy link

commented Feb 3, 2016

Marvelous! That command fixed my week-long running problem! Many thanks.
This information should be clearly stated in the Wikitude documentation, though.

@pnagele pnagele closed this Jul 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.