Ubuntu 20.04 gradle `could not get resource`
Я недавно скачал Gradle на Ubuntu 20.04. При постройке файла вылезает вот такая ошибка:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Could not resolve all files for configuration ':compileClasspath'.
> Could not resolve com.github.Anuken.Arc:arc-core:master-SNAPSHOT.
Required by: project:
> Could not resolve com.github.Anuken.Arc:arc-core:master-SNAPSHOT.
> Unable to load Maven meta-data from https://repo.maven.apache.org/maven2/com/github/Anuken/Arc/arc-core/master-SNAPSHOT/maven-metadata.xml.
> Could not get resource 'https://repo.maven.apache.org/maven2/com/github/Anuken/Arc/arc-core/master-SNAPSHOT/maven-metadata.xml'.
> Could not GET 'https://repo.maven.apache.org/maven2/com/github/Anuken/Arc/arc-core/master-SNAPSHOT/maven-metadata.xml'.
> java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
> Could not resolve com.github.Anuken.Arc:arc-core:master-SNAPSHOT.
> Unable to load Maven meta-data from https://jitpack.io/com/github/Anuken/Arc/arc-core/master-SNAPSHOT/maven-metadata.xml.
> Could not get resource 'https://jitpack.io/com/github/Anuken/Arc/arc-core/master-SNAPSHOT/maven-metadata.xml'.
> Could not GET 'https://jitpack.io/com/github/Anuken/Arc/arc-core/master-SNAPSHOT/maven-metadata.xml'.
> java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
> Could not resolve com.github.Anuken.Mindustry:core:master-SNAPSHOT.
Required by: project:
> Could not resolve com.github.Anuken.Mindustry:core:master-SNAPSHOT.
> Unable to load Maven meta-data from https://repo.maven.apache.org/maven2/com/github/Anuken/Mindustry/core/master-SNAPSHOT/maven-metadata.xml.
> Could not get resource 'https://repo.maven.apache.org/maven2/com/github/Anuken/Mindustry/core/master-SNAPSHOT/maven-metadata.xml'.
> Could not GET 'https://repo.maven.apache.org/maven2/com/github/Anuken/Mindustry/core/master-SNAPSHOT/maven-metadata.xml'.
> java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
> Could not resolve com.github.Anuken.Mindustry:core:master-SNAPSHOT.
> Unable to load Maven meta-data from https://jitpack.io/com/github/Anuken/Mindustry/core/master-SNAPSHOT/maven-metadata.xml.
> Could not get resource 'https://jitpack.io/com/github/Anuken/Mindustry/core/master-SNAPSHOT/maven-metadata.xml'.
> Could not GET 'https://jitpack.io/com/github/Anuken/Mindustry/core/master-SNAPSHOT/maven-metadata.xml'.
> java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
Можете помочь мне с исправлением ошибки.
Ответы (1 шт):
Автор решения: Vladimir Shefer
→ Ссылка
Кажется, что проблема не в Gradle, а в Java, которая используется на вашем компьютере.
Из текста ошибки видно, что Java не может получить файл через HTTPS.
java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
При поиске по данной ошибке я наткнулся на данный ответ. Он для Ubuntu 18.04, но, возможно, поможет и Вам. https://stackoverflow.com/a/50103533/9978153
Кажется, дело в том, что вам нужно обновить\заменить keystore.