Answer the question
In order to leave comments, you need to log in
How to solve sdk issue when compiling Unity?
After adding the UnityAds asset, when compiling the game, an error began to be thrown (screen1).
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):
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)
Answer the question
In order to leave comments, you need to log in
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 questionAsk a Question
731 491 924 answers to any question