I wanted to build a project with only one sprite for android but the build failed with the following errors:
More Information
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
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 resolve com.android.tools.build:gradle:3.4.0.
Required by:
project :launcher
> Could not resolve com.android.tools.build:gradle:3.4.0.
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.4.0/gradle-3.4.0.pom'.
> Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.4.0/gradle-3.4.0.pom'.
> java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
> Could not resolve com.android.tools.build:gradle:3.4.0.
> Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.4.0/gradle-3.4.0.pom'.
> Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.4.0/gradle-3.4.0.pom'.
> java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 2s
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at /home/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:197)
CommandInvokationFailure: Gradle build failed.
/home/jamand/Programme/java-se-8u41-ri/bin/java -classpath "/home/jamand/Unity/Hub/Editor/2019.4.18f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools/gradle/lib/gradle-launcher-5.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"
stderr[
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
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 resolve com.android.tools.build:gradle:3.4.0.
Required by:
project :launcher
> Could not resolve com.android.tools.build:gradle:3.4.0.
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.4.0/gradle-3.4.0.pom'.
> Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.4.0/gradle-3.4.0.pom'.
> java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
> Could not resolve com.android.tools.build:gradle:3.4.0.
> Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.4.0/gradle-3.4.0.pom'.
> Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.4.0/gradle-3.4.0.pom'.
> java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 2s
]
stdout[
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
Rethrow as GradleInvokationException: Gradle build failed
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message, System.Exception ex) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at /home/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:353)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at /home/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:197)
UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002b3] in /home/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:194
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in /home/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:95
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at /home/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:197)
ArgumentException: Getting control 0's position in a group with only 0 controls when doing mouseDrag
Aborting
UnityEngine.GUILayoutGroup.GetNext () (at /home/bokken/buildslave/unity/build/Modules/IMGUI/LayoutGroup.cs:122)
UnityEngine.GUILayoutUtility.BeginLayoutArea (UnityEngine.GUIStyle style, System.Type layoutType) (at /home/bokken/buildslave/unity/build/Modules/IMGUI/GUILayoutUtility.cs:361)
UnityEngine.GUILayoutUtility.DoBeginLayoutArea (UnityEngine.GUIStyle style, System.Type layoutType) (at /home/bokken/buildslave/unity/build/Modules/IMGUI/GUILayoutUtility.cs:378)
UnityEditor.EditorGUILayoutUtilityInternal.BeginLayoutArea (UnityEngine.GUIStyle style, System.Type LayoutType) (at /home/bokken/buildslave/unity/build/Editor/Mono/GUI/EditorGUIInternal.cs:66)
UnityEditor.HostView.BeginOffsetArea (UnityEngine.Rect screenRect, UnityEngine.GUIContent content, UnityEngine.GUIStyle style) (at /home/bokken/buildslave/unity/build/Editor/Mono/HostView.cs:311)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at /home/bokken/buildslave/unity/build/Editor/Mono/HostView.cs:337)
UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect) (at /home/bokken/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:407)
UnityEditor.DockArea.OldOnGUI () (at /home/bokken/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:396)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at /home/bokken/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:293)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at /home/bokken/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:508)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at /home/bokken/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:491)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at /home/bokken/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:484)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus) (at /home/bokken/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:477)
UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at /home/bokken/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:449)
UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase evt) (at /home/bokken/buildslave/unity/build/Modules/UIElements/Events/EventHandler.cs:77)
UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at /home/bokken/buildslave/unity/build/Modules/UIElements/Events/MouseCaptureDispatchingStrategy.cs:92)
UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at /home/bokken/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:310)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at /home/bokken/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:275)
UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at /home/bokken/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:238)
UnityEngine.UIElements.EventDispatcher.OpenGate () (at /home/bokken/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:203)
UnityEngine.UIElements.EventDispatcherGate.Dispose () (at /home/bokken/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:44)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at /home/bokken/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:301)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at /home/bokken/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:159)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at /home/bokken/buildslave/unity/build/Modules/UIElements/Panel.cs:257)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at /home/bokken/buildslave/unity/build/Modules/UIElements/UIElementsUtility.bindings.cs:404)
UnityEngine.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at /home/bokken/buildslave/unity/build/Modules/UIElements/UIElementsUtility.bindings.cs:194)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at /home/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:197)
I rode in other threads that I have to delete 29.0.0-rc1 in build-tools but there is only 28.0.3 by me.