Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
0
Question by Richarrd82 · Sep 04, 2016 at 09:54 AM · androidmobilesdkapk

Failed to re-package resources

Guys today i tried to add Ads to my game and then try it on the phone and suddenly this came up. Does somebody know what those errors mean?

UnityException: Resource compilation failed! Failed to recompile android resource files. See the Console for details. UnityEditor.Android.PostProcessAndroidPlayer.ShowErrDlgAndThrow (System.String title, System.String message, System.Exception ex) UnityEditor.Android.PostProcessAndroidPlayer.ShowErrDlgAndThrow (System.String title, System.String message) UnityEditor.Android.PostProcessAndroidPlayer.CompileResources (System.String stagingArea, System.String packageName, UnityEditor.Android.AndroidLibraries androidLibraries) UnityEditor.Android.PostProcessAndroidPlayer.PostProcessInternal (System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry) UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry) UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (BuildPostProcessArgs args) UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, System.String downloadWebplayerUrl, System.String manualDownloadWebplayerUrl, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry) (at

and this one

Failed to compile resources with the following parameters: -bootclasspath "C:/Users/Richard/Desktop/android-sdk-windows\platforms\android-24\android.jar" -d "C:\Users\Richard\Desktop\BMP Jumper\Temp\StagingArea\bin\classes" -source 1.6 -target 1.6 -encoding UTF-8 "com\MobileTest\Test\R.java" "com\unity3d\ads\android\R.java" warning: C:\Users\Richard\Desktop\android-sdk-windows\platforms\android-24\android.jar(java/lang/Object.class): major version 52 is newer than 51, the highest major version supported by this compiler. It is recommended that the compiler be upgraded. warning: C:\Users\Richard\Desktop\android-sdk-windows\platforms\android-24\android.jar(java/lang/AutoCloseable.class): major version 52 is newer than 51, the highest major version supported by this compiler. It is recommended that the compiler be upgraded. 2 warnings

ailed to compile resources with the following parameters: -bootclasspath "C:/Users/Richard/Desktop/android-sdk-windows\platforms\android-24\android.jar" -d "C:\Users\Richard\Desktop\BMP Jumper\Temp\StagingArea\bin\classes" -source 1.6 -target 1.6 -encoding UTF-8 "com\MobileTest\Test\R.java" "com\unity3d\ads\android\R.java" warning: C:\Users\Richard\Desktop\android-sdk-windows\platforms\android-24\android.jar(java/lang/Object.class): major version 52 is newer than 51, the highest major version supported by this compiler. It is recommended that the compiler be upgraded. warning: C:\Users\Richard\Desktop\android-sdk-windows\platforms\android-24\android.jar(java/lang/AutoCloseable.class): major version 52 is newer than 51, the highest major version supported by this compiler. It is recommended that the compiler be upgraded. 2 warnings

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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by liortal · Sep 04, 2016 at 08:29 PM

From the error you posted:

major version 52 is newer than 51, the highest major version supported by this compiler. It is recommended that the compiler be upgraded

This usually means you're using some code that was compiled using major version 52 (Java 8), but the Java version you have installed locally only supports classes that have a maximal version of 51.

This appears as a warning though, so i am not sure this is the root cause for the build failure. You can resolve this by installing JDK 8. Also make sure that you point Unity to use it (under Preferences --> External Tools).

NOTE: In some cases, it can get a bit tricky to find out why the build fails. If all else fails, I offer a service to help fix Android related build issues (due to manifest merging, conflicting plugins, etc). Check it out if you're unable to resolve your issues !

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

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Compiling Android game doesn't work out 0 Answers

Certain assets not working when build game,Certain assets not working when build project 0 Answers

How do I get Unity to stop making changes to AndroidManifest.xml? 2 Answers

Performance problems on Android (apk) 1 Answer

Android sdk build error 10 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