2015-12-01 2 views
-1

Я добавил библиотеку fastcontext Cordova к проекту Я получаю следующее сообщение об ошибке с cordova buildОшибка: не удается найти импорт символа org.apache.cordova.CordovaWebViewClient;

[email protected] ~/WorkStation/stage.js/example/game-orbit $ node -v 
v4.2.2 
[email protected] ~/WorkStation/stage.js/example/game-orbit $ npm -v 
2.14.7 
[email protected] ~/WorkStation/stage.js/example/game-orbit $ cordova -v 
5.4.0 
[email protected] ~/WorkStation/stage.js/example/game-orbit $ cordova build 
Running command: /home/bonnie/WorkStation/stage.js/example/game-orbit/platforms/android/cordova/build 
ANDROID_HOME=/home/bonnie/Android/Sdk 
JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 
Running: /home/bonnie/WorkStation/stage.js/example/game-orbit/platforms/android/gradlew cdvBuildDebug -b /home/bonnie/WorkStation/stage.js/example/game-orbit/platforms/android/build.gradle -Dorg.gradle.daemon=true 
:preBuild 
:compileDebugNdk UP-TO-DATE 
:preDebugBuild 
:checkDebugManifest 
:CordovaLib:compileLint 
:CordovaLib:copyDebugLint UP-TO-DATE 
:CordovaLib:mergeDebugProguardFiles UP-TO-DATE 
:CordovaLib:preBuild 
:CordovaLib:preDebugBuild 
:CordovaLib:checkDebugManifest 
:CordovaLib:prepareDebugDependencies 
:CordovaLib:compileDebugAidl UP-TO-DATE 
:CordovaLib:compileDebugRenderscript UP-TO-DATE 
:CordovaLib:generateDebugBuildConfig UP-TO-DATE 
:CordovaLib:generateDebugAssets UP-TO-DATE 
:CordovaLib:mergeDebugAssets UP-TO-DATE 
:CordovaLib:generateDebugResValues UP-TO-DATE 
:CordovaLib:generateDebugResources UP-TO-DATE 
:CordovaLib:packageDebugResources UP-TO-DATE 
:CordovaLib:processDebugManifest UP-TO-DATE 
:CordovaLib:processDebugResources UP-TO-DATE 
:CordovaLib:generateDebugSources UP-TO-DATE 
:CordovaLib:compileDebugJava UP-TO-DATE 
:CordovaLib:processDebugJavaRes UP-TO-DATE 
:CordovaLib:packageDebugJar UP-TO-DATE 
:CordovaLib:compileDebugNdk UP-TO-DATE 
:CordovaLib:packageDebugJniLibs UP-TO-DATE 
:CordovaLib:packageDebugLocalJar UP-TO-DATE 
:CordovaLib:packageDebugRenderscript UP-TO-DATE 
:CordovaLib:bundleDebug UP-TO-DATE 
:prepareAndroidCordovaLibUnspecifiedDebugLibrary UP-TO-DATE 
:prepareDebugDependencies 
:compileDebugAidl UP-TO-DATE 
:compileDebugRenderscript UP-TO-DATE 
:generateDebugBuildConfig UP-TO-DATE 
:generateDebugAssets UP-TO-DATE 
:mergeDebugAssets UP-TO-DATE 
:generateDebugResValues UP-TO-DATE 
:generateDebugResources UP-TO-DATE 
:mergeDebugResources UP-TO-DATE 
:processDebugManifest UP-TO-DATE 
:processDebugResources UP-TO-DATE 
:generateDebugSources UP-TO-DATE 
:compileDebugJava 
/home/bonnie/WorkStation/stage.js/example/game-orbit/platforms/android/src/com/piqnt/fastcontext/FastContextPlugin.java:7: error: cannot find symbol 
import org.apache.cordova.CordovaWebViewClient; 
         ^
    symbol: class CordovaWebViewClient 
    location: package org.apache.cordova 
/home/bonnie/WorkStation/stage.js/example/game-orbit/platforms/android/src/com/piqnt/fastcontext/FastContextPlugin.java:42: error: cannot find symbol 
        webView.addView(fastView); 
         ^
    symbol: method addView(FastContextView) 
    location: variable webView of type CordovaWebView 
/home/bonnie/WorkStation/stage.js/example/game-orbit/platforms/android/src/com/piqnt/fastcontext/FastContextPlugin.java:51: error: cannot find symbol 
       ViewGroup webParent = (ViewGroup) webView.getParent(); 
                 ^
    symbol: method getParent() 
    location: variable webView of type CordovaWebView 
/home/bonnie/WorkStation/stage.js/example/game-orbit/platforms/android/src/com/piqnt/fastcontext/FastContextPlugin.java:58: error: no suitable method found for removeView(CordovaWebView) 
       webParent.removeView(webView); 
         ^
    method ViewGroup.removeView(View) is not applicable 
     (actual argument CordovaWebView cannot be converted to View by method invocation conversion) 
    method ViewManager.removeView(View) is not applicable 
     (actual argument CordovaWebView cannot be converted to View by method invocation conversion) 
/home/bonnie/WorkStation/stage.js/example/game-orbit/platforms/android/src/com/piqnt/fastcontext/FastContextPlugin.java:62: error: no suitable method found for addView(CordovaWebView) 
       newLayout.addView(webView); 
         ^
    method ViewGroup.addView(View,int,LayoutParams) is not applicable 
     (actual and formal argument lists differ in length) 
    method ViewGroup.addView(View,LayoutParams) is not applicable 
     (actual and formal argument lists differ in length) 
    method ViewGroup.addView(View,int,int) is not applicable 
     (actual and formal argument lists differ in length) 
    method ViewGroup.addView(View,int) is not applicable 
     (actual and formal argument lists differ in length) 
    method ViewGroup.addView(View) is not applicable 
     (actual argument CordovaWebView cannot be converted to View by method invocation conversion) 
/home/bonnie/WorkStation/stage.js/example/game-orbit/platforms/android/src/com/piqnt/fastcontext/FastContextPlugin.java:64: error: cannot find symbol 
       webView.setBackgroundColor(Color.TRANSPARENT); 
        ^
    symbol: method setBackgroundColor(int) 
    location: variable webView of type CordovaWebView 
/home/bonnie/WorkStation/stage.js/example/game-orbit/platforms/android/src/com/piqnt/fastcontext/FastContextPlugin.java:65: error: cannot find symbol 
       webView.setLayerType(WebView.LAYER_TYPE_SOFTWARE, null); 
        ^
    symbol: method setLayerType(int,<null>) 
    location: variable webView of type CordovaWebView 
/home/bonnie/WorkStation/stage.js/example/game-orbit/platforms/android/src/com/piqnt/fastcontext/FastContextPlugin.java:66: error: cannot find symbol 
       webView.setWebViewClient(new CordovaWebViewClient(cordova, 
              ^
    symbol: class CordovaWebViewClient 
8 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. 

BUILD FAILED 

Total time: 3.498 secs 

/home/bonnie/WorkStation/stage.js/example/game-orbit/platforms/android/cordova/node_modules/q/q.js:126 
        throw e; 
        ^
Error code 1 for command: /home/bonnie/WorkStation/stage.js/example/game-orbit/platforms/android/gradlew with args: cdvBuildDebug,-b,/home/bonnie/WorkStation/stage.js/example/game-orbit/platforms/android/build.gradle,-Dorg.gradle.daemon=true 
ERROR building one of the platforms: Error: /home/bonnie/WorkStation/stage.js/example/game-orbit/platforms/android/cordova/build: Command failed with exit code 1 
You may not have the required environment or OS to build this project 
Error: /home/bonnie/WorkStation/stage.js/example/game-orbit/platforms/android/cordova/build: Command failed with exit code 1 

ответ

-1

Try установить Android инструменты для сборки версии 21 и 22 из SDK Manager.

Смежные вопросы