D
D
destrix2020-08-07 23:12:03
Android
destrix, 2020-08-07 23:12:03

Error when compiling a game for Android in Unity?

When compiling a project on android in Unity, it gives the following error:
Failed to recompile android resource files
Full error:

CommandInvokationFailure: Failed to recompile android resource files.
C:/Program Files/Java/jdk-14.0.2\bin\javac.exe -bootclasspath "C:/Users/zZaKko64/AppData/Local/Android/Sdk\platforms\android-30\android.jar" -d "C:\Users\zZaKko64\Desktop\SuperMegaCaseSimulator\Temp\StagingArea\bin\classes" -source 1.6 -target 1.6 -encoding UTF-8 "com\google\unity\R.java" "com\google\unity\ads\R.java" "com\unity3d\EditorPlugin\R.java" "com\zzakko\casesimulator\R.java"

stderr[
error: Source option 6 is no longer supported. Use 7 or later.
error: Target option 6 is no longer supported. Use 7 or later.
]
stdout[

]
exit code: 2
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.PostProcessor.Tasks.TasksCommon.Exec (System.String command, System.String args, System.String workingdir, System.String errorMsg, Int32 retriesOnFailure)
UnityEditor.HostView:OnGUI()


I searched Google for a solution, but I couldn't figure out why it was, and in the end I didn't understand how to solve it.
If someone has come across or knows a solution, I will be grateful!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
zZaKko, 2020-08-07
@destrix

Install jdk 8 instead of the current one. And change it in Unity.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question