使用InAppBrowser Cordova 5.3.3无法找到符号org.apache.cordova.CordovaHttpAuthHandler错误 [英] Error cannot find symbol org.apache.cordova.CordovaHttpAuthHandler using InAppBrowser Cordova 5.3.3
问题描述
我正在使用cordova
和Multi-Device hybrid app
开发混合移动应用程序,
当我尝试运行用于设备或仿真器的构建应用程序时出现此错误
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版本是1.1.2-dev
inappbrowser version is 1.1.2-dev
ps,我在InAppBrowser github上发现了此提交 https://github.com/apache/cordova-plugin-inappbrowser/pull/82/files?diff=split
p.s I found this commit on InAppBrowser github https://github.com/apache/cordova-plugin-inappbrowser/pull/82/files?diff=split
推荐答案
我发现了问题,并在有人遇到相同问题的情况下在此处写下答案
I found the problem and writing the answer here in case of somebody has the same problem
问题的根源是Cordova上的版本,看来此错误存在于<上. v4,但我正在使用5.3.3怎么可能
当您从Visual Studio菜单中clear cordova cache
时,它将v4.0.0替换到目录中,因此您需要再次将cordova从%APPDATA%\npm\node_modules\cordova
复制到%APPDATA%\npm\node_modules\vs-mda\node_modules\cordova
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
这篇关于使用InAppBrowser Cordova 5.3.3无法找到符号org.apache.cordova.CordovaHttpAuthHandler错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!