D
D
destrix2020-10-16 23:38:13
Android
destrix, 2020-10-16 23:38:13

How to solve sdk issue when compiling Unity?

After adding the UnityAds asset, when compiling the game, an error began to be thrown (screen1).
5f8a02db0c005582234009.png
After studying its text, I realized that there was something with sdk and in player settings > other settings > minimum api level instead of 16 - 19 (also set 21 and higher). But after the start of knocking out other errors (skri2 + text):5f8a039683ada985256147.png

1.CommandInvokationFailure: Gradle build failed. 
C:/Program Files/Java/jdk1.8.0_261\bin\java.exe -classpath "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-4.6.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"

stderr[

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processReleaseResources'.
> Android resource linking failed
  Output:  C:\Users\username\Desktop\SuperMegaCaseSimulator\Temp\gradleOut\build\intermediates\incremental\mergeReleaseResources\merged.dir\values\values.xml:194: error: resource android:attr/fontStyle not found.
  C:\Users\username\Desktop\SuperMegaCaseSimulator\Temp\gradleOut\build\intermediates\incremental\mergeReleaseResources\merged.dir\values\values.xml:195: error: resource android:attr/font not found.
 .... ///ЗДЕСЬ НЕ ВСЯ ОШИБКА


2.UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
  at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x0020e] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:181 
  at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00065] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:88 
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

I don't even know how to start looking for something about this error. on it to solve to address on habr.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rag'n' Code Man, 2020-10-17
@iDmitriyWinX

Probably a problem with the Android SDK.
You can download the 200+GB SDK in the Android Studio manager, or install the one that comes with the engine when you install it via the Unity Hub.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question