[SOLVED]Cocos2d-x can't download jars (Ubuntu)

[SOLVED]Cocos2d-x can't download jars (Ubuntu)
0.0 0

#1

I have installed openjdk-9. Usual Android Studio’s projects run successfully on device. I didn’t change any cocos or projects configuration. I use Cocos2d-x 3.16, C++ project for Android.
From proj.android-studio I run that: cocos run -p android --android-studio
And getting this:
FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'proj.android-studio'.
> Could not resolve all files for configuration ':classpath'.
   > Could not download gradle-core.jar (com.android.tools.build:gradle-core:2.3.3)
      > Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle-core/2.3.3/gradle-core-2.3.3.jar'.
         > Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle-core/2.3.3/gradle-core-2.3.3.jar'.
            > sun.security.validator.ValidatorException: No trusted certificate found
   > Could not download builder.jar (com.android.tools.build:builder:2.3.3)
      > Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/builder/2.3.3/builder-2.3.3.jar'.
         > Could not GET 'https://jcenter.bintray.com/com/android/tools/build/builder/2.3.3/builder-2.3.3.jar'.
            > sun.security.validator.ValidatorException: No trusted certificate found
   > Could not download lint.jar (com.android.tools.lint:lint:25.3.3)
      > Could not get resource 'https://jcenter.bintray.com/com/android/tools/lint/lint/25.3.3/lint-25.3.3.jar'.
         > Could not GET 'https://jcenter.bintray.com/com/android/tools/lint/lint/25.3.3/lint-25.3.3.jar'.
            > sun.security.validator.ValidatorException: No trusted certificate found
   > Could not download sdklib.jar (com.android.tools:sdklib:25.3.3)
      > Could not get resource 'https://jcenter.bintray.com/com/android/tools/sdklib/25.3.3/sdklib-25.3.3.jar'.
         > Could not GET 'https://jcenter.bintray.com/com/android/tools/sdklib/25.3.3/sdklib-25.3.3.jar'.
            > sun.security.validator.ValidatorException: No trusted certificate found
   > Could not download sdk-common.jar (com.android.tools:sdk-common:25.3.3)
      > Could not get resource 'https://jcenter.bintray.com/com/android/tools/sdk-common/25.3.3/sdk-common-25.3.3.jar'.
         > Could not GET 'https://jcenter.bintray.com/com/android/tools/sdk-common/25.3.3/sdk-common-25.3.3.jar'.
            > sun.security.validator.ValidatorException: No trusted certificate found
   > Could not download ddmlib.jar (com.android.tools.ddms:ddmlib:25.3.3)
      > Could not get resource 'https://jcenter.bintray.com/com/android/tools/ddms/ddmlib/25.3.3/ddmlib-25.3.3.jar'.
         > Could not GET 'https://jcenter.bintray.com/com/android/tools/ddms/ddmlib/25.3.3/ddmlib-25.3.3.jar'.
            > sun.security.validator.ValidatorException: No trusted certificate found
   > Could not download protos.jar (com.android.tools.analytics-library:protos:25.3.3)
      > Could not get resource 'https://jcenter.bintray.com/com/android/tools/analytics-library/protos/25.3.3/protos-25.3.3.jar'.
         > Could not GET 'https://jcenter.bintray.com/com/android/tools/analytics-library/protos/25.3.3/protos-25.3.3.jar'.
            > sun.security.validator.ValidatorException: No trusted certificate found
   > Could not download lint-checks.jar (com.android.tools.lint:lint-checks:25.3.3)
      > Could not get resource 'https://jcenter.bintray.com/com/android/tools/lint/lint-checks/25.3.3/lint-checks-25.3.3.jar'.
         > Could not GET 'https://jcenter.bintray.com/com/android/tools/lint/lint-checks/25.3.3/lint-checks-25.3.3.jar'.
            > sun.security.validator.ValidatorException: No trusted certificate found
   > Could not download repository.jar (com.android.tools:repository:25.3.3)
      > Could not get resource 'https://jcenter.bintray.com/com/android/tools/repository/25.3.3/repository-25.3.3.jar'.
         > Could not GET 'https://jcenter.bintray.com/com/android/tools/repository/25.3.3/repository-25.3.3.jar'.
            > sun.security.validator.ValidatorException: No trusted certificate found
   > Could not download lint-api.jar (com.android.tools.lint:lint-api:25.3.3)
      > Could not get resource 'https://jcenter.bintray.com/com/android/tools/lint/lint-api/25.3.3/lint-api-25.3.3.jar'.
         > Could not GET 'https://jcenter.bintray.com/com/android/tools/lint/lint-api/25.3.3/lint-api-25.3.3.jar'.
            > sun.security.validator.ValidatorException: No trusted certificate found

* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.

BUILD FAILED

Total time: 11.689 secs
Received result Failure[value=org.gradle.initialization.ReportedException: org.gradle.internal.exceptions.LocationAwareException: A problem occurred configuring root project 'proj.android-studio'.] from daemon DaemonInfo{pid=7452, address=[f714e675-1ad0-483c-9baa-b4702c7c7051 port:35623, addresses:[/0:0:0:0:0:0:0:1, /127.0.0.1]], state=Idle, lastBusy=1515330889028, context=DefaultDaemonContext[uid=824dfc12-a07d-401d-805e-38fda99ac9cc,javaHome=/usr/lib/jvm/java-9-openjdk-amd64,daemonRegistryDir=/home/u99/.gradle/daemon,pid=7452,idleTimeout=10800000,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant]} (build should be done).
Error running command, return code: 1.

#2

How did you get Cocos2d-x? From our downloads as a .zip or git clone ...?

What Android NDK/SDK?

Have you changed anything in gradle.properties?


#3

I reinstalled Ubuntu, now it’s fine.