Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
3
Question by anywherenotes · Nov 11, 2014 at 05:24 AM · errorbuilderror-building-player

Resource compilation failed! Failed to recompile android resource files. See the Console for details.

I'm working on adding Google Play Game Services to a Unity project.

Started getting these errors recently, however not sure if it is because of the Game Services, or could be I updated my machine.

The following in Console output:

Failed to compile resources with the following parameters: -bootclasspath "/Users/alex/development/adt-bundle-mac-x86_64-20131030/sdk/platforms/android-21/android.jar" -d "/Users/alex/Documents/development/unity/Maze/Maze/Temp/StagingArea/bin/classes" -source 1.6 -target 1.6 -encoding UTF-8 "com/facebook/android/R.java" "com/google/android/gms/R.java" "com/google/example/games/basegameutils/R.java" "com/google/example/games/mainlibproj/R.java" "com/mildspring/maze/R.java" warning: java/lang/Object.class(java/lang:Object.class): major version 51 is newer than 50, the highest major version supported by this compiler. It is recommended that the compiler be upgraded. 1 warning

UnityEditor.HostView:OnGUI()

Error building Player: UnityException: Resource compilation failed! Failed to recompile android resource files. See the Console for details.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

4 Replies

· Add your reply
  • Sort: 
avatar image
19
Best Answer

Answer by Trungdv · Nov 11, 2014 at 08:00 AM

You have not installed jdk 1.7 yet or has been installed but did not set Path correctly.

  • Open Terminal, run:

      open ~/.bash_profile
    
    
  • Add these lines into bash_profile:

     export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/bin
     export PATH=$JAVA_HOME/bin:$PATH
    
    
  • Run this command:

     sudo ln -nsf /Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK
    
    

*NOTE: You should not just copy all of these commands, use your path instead. (For example, my path is jdk1.7.0_71.jdk because my jdk version is jdk7u71, if your version is difference, your path will be difference)

Comment
Add comment · Show 16 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image anywherenotes · Nov 12, 2014 at 01:13 AM 0
Share

Thank you, this solved the issue, can't up-vote yet, not enough rep.

avatar image unity-nikkolai · Nov 19, 2014 at 12:16 AM 0
Share

This solved the issue for me as well. Experienced the issue after updating and installing the latest Android SD$$anonymous$$ packages.

avatar image Fliperamma · Nov 22, 2014 at 06:28 PM 0
Share

Thanks, this solved my problem too, I'm using 1.8.0_11

avatar image JonnyHilly · Dec 12, 2014 at 08:45 PM 0
Share

I'm just getting setup with all this... do you install the JD$$anonymous$$ or the JD$$anonymous$$ or AR$$anonymous$$ ?

avatar image JonnyHilly · Dec 15, 2014 at 07:45 PM 1
Share

Sorry, I should have been clearer. on the JD$$anonymous$$ download site, there are many options.... Runtime only, developer option etc... after more research... gonna answer my own question.... Download the JD$$anonymous$$ (not JD$$anonymous$$ for AR$$anonymous$$ processor) and pick the version that matches your processor (32bit or 64bit) If you are on mac, I found this tool useful also, to set environment variables in a tool, rather than manually editing.... http://diaryproducts.net/files/EnvPane-0.3.dmg

Show more comments
avatar image
12

Answer by DWishR · Nov 28, 2017 at 12:33 AM

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.

Comment
Add comment · Show 7 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Jnth · Nov 28, 2017 at 08:31 AM 0
Share

So many thanks ! You save my day

avatar image mahsa1001 · Dec 29, 2017 at 06:53 AM 0
Share

Thank you so much. It was amazingly helpful!

avatar image jmarcos007 · Jan 20, 2018 at 09:51 PM 0
Share

Works for me with Java JD$$anonymous$$ SE 8 Nice =D

avatar image $$anonymous$$ · Feb 01, 2018 at 09:57 AM 0
Share

saved my life, much appreciated

avatar image linghan0919 · Feb 01, 2018 at 09:56 PM 0
Share

works for me! Thank you so much!

Show more comments
avatar image
1

Answer by donmetapod · Sep 12, 2016 at 04:08 PM

In my case JDK was installed but Unity was pointing to an older version causing the same error.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by lebustamant · Mar 27, 2018 at 11:05 PM

I just got the same issue using 5.6.3p2 and jdk 1.10. Which is the actual, compatible jdk? Or is there a new reason for this error?

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image michaelgal4 · Mar 29, 2018 at 01:15 PM 0
Share

I'm having the same problem. Did you figure out a way to fix it?

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

19 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Distribute terrain in zones 3 Answers

Build Error 1 Answer

errors on IL2CPP build 0 Answers

Android Build problem? 2 Answers

Game not working after build 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges