Exception in thread "Build Event Notification" java.lang.NoClassDefFoundError: Could not initialize class sun.security.ssl.SSLContextImpl$TLSContext
Exception in thread "Build Event Notification" java.lang.NoClassDefFoundError: Could not initialize class sun.security.ssl.SSLContextImpl$TLSContext
我想用 Ionic V3 为 Android 构建一个应用程序,但是在发布时构建它时遇到问题。
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:mergeDebugResources'.
java.lang.NoClassDefFoundError: Could not initialize class sun.security.ssl.SSLContextImpl$TLSContext
Exception in thread "Build Event Notification" java.lang.NoClassDefFoundError: Could not initialize class sun.security.ssl.SSLContextImpl$TLSContext
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at java.security.Provider$Service.getImplClass(Provider.java:1728)
at java.security.Provider$Service.newInstance(Provider.java:1686)
at sun.security.jca.GetInstance.getInstance(GetInstance.java:236)
at sun.security.jca.GetInstance.getInstance(GetInstance.java:164)
at javax.net.ssl.SSLContext.getInstance(SSLContext.java:156)
at com.crashlytics.reloc.org.apache.http.ssl.SSLContexts.createDefault(SSLContexts.java:51)
at com.crashlytics.reloc.org.apache.http.impl.client.HttpClientBuilder.build(HttpClientBuilder.java:966)
at com.crashlytics.reloc.org.apache.http.impl.client.HttpClients.createDefault(HttpClients.java:56)
at com.crashlytics.api.net.proxy.ProxySettings.getClientFor(ProxySettings.java:56)
at com.crashlytics.api.RestfulWebApi.notifyBuildEvent(RestfulWebApi.java:1438)
at com.crashlytics.api.RestfulWebApi.access0(RestfulWebApi.java:74)
at com.crashlytics.api.RestfulWebApi.run(RestfulWebApi.java:1371)
at java.lang.Thread.run(Thread.java:748)
这似乎是由集成在这个包中的 Crashlytics(我什至不使用)引起的 https://github.com/dpa99c/cordova-plugin-firebasex。
当我在调试模式下构建应用程序时,我仍然有异常,但构建一直进行到最后,我仍然可以 运行 在我的 phone.
我怎样才能避免这个问题?有没有办法完全禁用 Crashlytics,这样我就不再有这个异常了?
谢谢
好吧,这都是因为 JDK 版本。我最终更新了 JDK 并且一切正常。
我想用 Ionic V3 为 Android 构建一个应用程序,但是在发布时构建它时遇到问题。
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:mergeDebugResources'.
java.lang.NoClassDefFoundError: Could not initialize class sun.security.ssl.SSLContextImpl$TLSContext
Exception in thread "Build Event Notification" java.lang.NoClassDefFoundError: Could not initialize class sun.security.ssl.SSLContextImpl$TLSContext
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at java.security.Provider$Service.getImplClass(Provider.java:1728)
at java.security.Provider$Service.newInstance(Provider.java:1686)
at sun.security.jca.GetInstance.getInstance(GetInstance.java:236)
at sun.security.jca.GetInstance.getInstance(GetInstance.java:164)
at javax.net.ssl.SSLContext.getInstance(SSLContext.java:156)
at com.crashlytics.reloc.org.apache.http.ssl.SSLContexts.createDefault(SSLContexts.java:51)
at com.crashlytics.reloc.org.apache.http.impl.client.HttpClientBuilder.build(HttpClientBuilder.java:966)
at com.crashlytics.reloc.org.apache.http.impl.client.HttpClients.createDefault(HttpClients.java:56)
at com.crashlytics.api.net.proxy.ProxySettings.getClientFor(ProxySettings.java:56)
at com.crashlytics.api.RestfulWebApi.notifyBuildEvent(RestfulWebApi.java:1438)
at com.crashlytics.api.RestfulWebApi.access0(RestfulWebApi.java:74)
at com.crashlytics.api.RestfulWebApi.run(RestfulWebApi.java:1371)
at java.lang.Thread.run(Thread.java:748)
这似乎是由集成在这个包中的 Crashlytics(我什至不使用)引起的 https://github.com/dpa99c/cordova-plugin-firebasex。
当我在调试模式下构建应用程序时,我仍然有异常,但构建一直进行到最后,我仍然可以 运行 在我的 phone.
我怎样才能避免这个问题?有没有办法完全禁用 Crashlytics,这样我就不再有这个异常了?
谢谢
好吧,这都是因为 JDK 版本。我最终更新了 JDK 并且一切正常。