trustAnchors parameter must be non-empty error | Gradle | Cordova

Viewed 1929

I've been trying to create an Android app from Angular using Cordova and JDK 8. After running cordova build android I get this error: component versions:

  1. Angular 9
  2. Gradle 7
  3. Cordova 10
  4. SDKmanager 5
Exception in thread "main" javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty

Things I've tried:

  1. renaming https://services.gradle.org/distributions/gradle-6.5-all.zip to http but it renames itself again to https
  2. reinstalling JDK 8
  3. Run CMD/Powershell as Administrator

enter image description here

1 Answers

Problem was with the JDK 8. I instead used a JDK from another community. You can download it from this address: https://github.com/ojdkbuild/ojdkbuild

works fine

Related