[英]Run android application (ionic cordova) error “unable to find valid certification path to the requested target”
我對js技術不是很熟悉,並且正在從事Android的Typescript項目(使用ionic cordova)。 我已經從一位同事那里檢索了這個項目。 該項目在其環境下工作。
我的配置:
我在Visual Studio Code中運行了以下命令
第二個觸發以下異常:
Exception in thread "main" javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
...
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:145)
at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:131)
at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:382)
此外,當我開始“離子服務”時,在我的瀏覽器上會打開一個本地主機頁面。 首先,將webapp顯示一秒鍾,然后顯示錯誤頁面:
“未捕獲(承諾):cordova_not_available”
使用以下堆棧:
c@http://localhost:8100/build/polyfills.js:3:19752
c@http://localhost:8100/build/polyfills.js:3:19461
f/<@http://localhost:8100/build/polyfills.js:3:20233 F</l</t.prototype.invokeTask@http://localhost:8100/build/polyfills.js:3:15649 onInvokeTask@http://localhost:8100/build/vendor.js:5436:24
F</l</t.prototype.invokeTask@http://localhost:8100/build/polyfills.js:3:15562
F</c</r.prototype.runTask@http://localhost:8100/build/polyfills.js:3:10815
o@http://localhost:8100/build/polyfills.js:3:7887
以及以下信息:
我不知道出什么問題了,特別是當該項目在我同事的電腦上工作時。 因此,我假設我在項目配置文件中沒有任何事情。
現在,它可以在“ ionic cordova build browser”上運行,但不能在“ ionic cordova build android”上運行(android在package.json中定義為平台)。
我不知道該怎么辦。 你有什么主意嗎? 謝謝 !
終於,幾天后,我發現問題出在已安裝的JRE。 我卸載了當前的JRE 8並安裝了另一個版本,它工作正常。
但是,我不明白為什么,但是現在還可以。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.