1
votes

I'm trying to build my project in Unity3d to an android app and it gives me this Error:

Failed to compile resources with the following parameters: -bootclasspath "C:/Users/itayt/AppData/Local/Android/sdk\platforms\android-24\android.jar" -d "C:\Users\itayt\Documents\ShowTest\Temp\StagingArea\bin\classes" -source 1.6 -target 1.6 -encoding UTF-8 "com\wikitude\unity\R.java"

I saw a solution on the web but it was for Ubuntu, and I'm using Windows. things I already tried:

-adding the Java path in the Environment Variables
-downloading the latest Jdk and Jre

any solutions to a Windows user?

2

2 Answers

6
votes

For anyone else who ends up here: As of Unity 2017, Unity is incompatible with JDK 9. You need to continue to use JDK 1.8 for the time being.

1
votes

It is rather hard to give a straight answer because the information provided too generic, but let's give it a shot:

First of all, add JDK installation to PATH. Something like C:\Program Files\Java\JDK version\bin

If you can run javac in CMD without giving full path to it then you're good

Then verify that JDK_HOME variable is set correctly too

Also, make sure that the target SDK tools, build-tools and SDK platform are installed. Just in case, run Android SDK manager and update/install components of the same build version as you set in Unity's build settings. Android compiler is quite sensitive to these matters

Validate the errors and build messages in the Editor log The Editor log can be brought up through the Open Editor Log button in Unity’s Console window. Alternatively, check this location:

C:\Users\username\AppData\Local\Unity\Editor\Editor.log - usually it will give a bit more information