Error cannot find symbol org.apache.cordova.CordovaHttpAuthHandler using InAppBrowser Cordova 5.3.3

◇◆丶佛笑我妖孽 提交于 2019-12-12 05:32:02

问题


I am developing a hybrid mobile app using cordova andMulti-Device hybrid app, I get this error when I try to run the build the app for device or emulator

[javac] C:\phonegap\projects\JarChee\Mobile\JarCheeMobileApp\JarChee\bld\Debug\platforms\android\src\org\apache\cordova\inappbrowser\InAppBrowser.java:56: error: cannot find symbol
[javac] import org.apache.cordova.CordovaHttpAuthHandler;
[javac]                          ^
[javac]   symbol:   class CordovaHttpAuthHandler
[javac]   location: package org.apache.cordova
[javac] C:\phonegap\projects\JarChee\Mobile\JarCheeMobileApp\JarChee\bld\Debug\platforms\android\src\org\apache\cordova\inappbrowser\InAppBrowser.java:896: error: cannot find symbol
[javac]             if (pluginManager != null && pluginManager.onReceivedHttpAuthRequest(webView, new CordovaHttpAuthHandler(handler), host, realm)) {
[javac]                                                                                               ^
[javac]   symbol:   class CordovaHttpAuthHandler
[javac]   location: class InAppBrowser.InAppBrowserClient

inappbrowser version is 1.1.2-dev

p.s I found this commit on InAppBrowser github https://github.com/apache/cordova-plugin-inappbrowser/pull/82/files?diff=split


回答1:


I found the problem and writing the answer here in case of somebody has the same problem

The root of the problem was the version on Cordova, it seems that this error exists on < v4, but I was using 5.3.3 how this is possible When you clear cordova cache from visual studio menu, it replace v4.0.0 into the directories, so you need to copy the cordova again from %APPDATA%\npm\node_modules\cordova to %APPDATA%\npm\node_modules\vs-mda\node_modules\cordova



来源:https://stackoverflow.com/questions/34484802/error-cannot-find-symbol-org-apache-cordova-cordovahttpauthhandler-using-inappbr

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!