- Home /
CommandInvokationFailure: Gradle build failed.
CommandInvokationFailure: Gradle build failed. C:/Program Files/2019.4.28f1/Editor/Data/PlaybackEngines/AndroidPlayer\OpenJDK\bin\java.exe -classpath "C:\Program Files\2019.4.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-5.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"
stderr[
FAILURE: Build failed with an exception.
What went wrong: A problem occurred configuring project ':launcher'.
Could not resolve all artifacts for configuration ':launcher:classpath'. Could not download gradle.jar (com.android.tools.build:gradle:3.4.0)
Could not download builder.jar (com.android.tools.build:builder:3.4.0)
Could not download tracker.jar (com.android.tools.analytics-library:tracker:26.4.0)
Could not download sdk-common.jar (com.android.tools:sdk-common:26.4.0)
Could not download ddmlib.jar (com.android.tools.ddms:ddmlib:26.4.0)
Could not download sdklib.jar (com.android.tools:sdklib:26.4.0)
Could not download layoutlib-api.jar (com.android.tools.layoutlib:layoutlib-api:26.4.0)
Could not download dvlib.jar (com.android.tools:dvlib:26.4.0)
Could not download repository.jar (com.android.tools:repository:26.4.0)
Could not download common.jar (com.android.tools:common:26.4.0)
Could not download kotlin-stdlib-jdk8.jar (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.21)
Could not download transform-api.jar (com.android.tools.build:transform-api:2.0.0-deprecated-use-gradle-api)
Could not download jetifier-processor.jar (com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta04)
Could not download asm-analysis.jar (org.ow2.asm:asm-analysis:6.0)
Could not download asm-commons.jar (org.ow2.asm:asm-commons:6.0)
Could not download asm-util.jar (org.ow2.asm:asm-util:6.0)
Could not download asm-tree.jar (org.ow2.asm:asm-tree:6.0)
Could not download asm.jar (org.ow2.asm:asm:6.0)
Could not download jopt-simple.jar (net.sf.jopt-simple:jopt-simple:4.9)
Could not download proguard-gradle.jar (net.sf.proguard:proguard-gradle:6.0.3)
Could not download bundletool.jar (com.android.tools.build:bundletool:0.7.2)
Could not download jetifier-core.jar (com.android.tools.build.jetifier:jetifier-core:1.0.0-beta04)
Could not download protobuf-java-util.jar (com.google.protobuf:protobuf-java-util:3.4.0)
Could not download protos.jar (com.android.tools.analytics-library:protos:26.4.0)
Could not download aapt2-proto.jar (com.android.tools.build:aapt2-proto:0.3.1)
Could not download protobuf-java.jar (com.google.protobuf:protobuf-java:3.4.0)
Could not download builder-model.jar (com.android.tools.build:builder-model:3.4.0)
Could not download apkzlib.jar (com.android.tools.build:apkzlib:3.4.0)
Could not download apksig.jar (com.android.tools.build:apksig:3.4.0)
Could not download javawriter.jar (com.squareup:javawriter:2.5.0)
Could not download bcpkix-jdk15on.jar (org.bouncycastle:bcpkix-jdk15on:1.56)
Could not download bcprov-jdk15on.jar (org.bouncycastle:bcprov-jdk15on:1.56)
Could not download javax.inject.jar (javax.inject:javax.inject:1)
Could not download fastutil.jar (it.unimi.dsi:fastutil:7.2.0)
Could not download json-simple.jar (com.googlecode.json-simple:json-simple:1.1)
Could not download annotations.jar (com.android.tools:annotations:26.4.0)
Could not download jimfs.jar (com.google.jimfs:jimfs:1.1)
Could not download guava.jar (com.google.guava:guava:26.0-jre)
Could not download gson.jar (com.google.code.gson:gson:2.8.0)
Could not download httpmime.jar (org.apache.httpcomponents:httpmime:4.5.6)
Could not download httpclient.jar (org.apache.httpcomponents:httpclient:4.5.6)
Could not download httpcore.jar (org.apache.httpcomponents:httpcore:4.4.10)
Could not download kotlin-reflect.jar (org.jetbrains.kotlin:kotlin-reflect:1.3.21)
Could not download databinding-common.jar (androidx.databinding:databinding-common:3.4.0)
Answer by Bob-Zhang · Dec 16, 2021 at 07:29 AM
I found a solution from this page and it worked for me:
https://www.cxymm.net/article/qq_41594985/111353658
make a keystore for your project in playersetting>>publish setting