2016-01-18 195 views
0

我跟這裏完全教程:http://www.wikitude.com/developer/documentation/phonegapWikitude科爾多瓦構建失敗

但是當我運行科爾多瓦構建我得到這個錯誤。似乎有訪問權限的問題,但這似乎對我來說在代碼...

任何幫助非常感謝!

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/patrick/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/patrick/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/patrick/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/patrick/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/patrick/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/patrick/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/patrick/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/patrick/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. 

回答

3

我找到答案here

請確保您的Android科爾多瓦/ PhoneGap的命令或者是科爾多瓦平臺添加[email protected]或科爾多瓦構建[email protected]。我們的示例應用生成腳本包含版本說明符,它確保所有必需的運行時權限函數和常量都可用。可能是因爲你需要更新你的cordova/phonegap安裝。

我希望這有助於

0

我的猜測是你的Android SDK版本太舊了。請安裝Android SDK API級別23和NDK r10e。

相關問題