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 amillardo · Aug 27, 2015 at 12:18 PM · androidunity5build-errorandroidplugin

Android Plugin with AppCompat Theme

Hi everyone,

I encountered a problem which I am unable to solve til now. So any input is greatly appreciated.

I'm trying to build a plugin that uses an AppCompat style and I keep getting the error "Failed to re-package resources"

The error seems to come from an error within my .aar file when Unity compiles it. It has the error:

 error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.NoActionBar'.

Anyone has any solution to this? Thanks in advance!

For your info, I am using the latest Unity and I also imported Cardboard SDK to the Unity project.

Comment
Add comment · Show 1
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 Anne-Pier · Jan 11, 2018 at 12:09 PM 0
Share

How do you add an AppCompat theme to Unity Activity? I tried this but in Java it still says my Activity needs an AppCompat theme.

Also do you know how to start an AppCompatActivity in Unity, I can't get it working...

2 Replies

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

Answer by amillardo · Aug 28, 2015 at 08:21 AM

Hi guys,

I managed to get it working (like finally)!!

Well anyway, the above problem arise because Unity does not include appcompat library when it builds. I read about this in the unity blog. That is because of several reasons but mainly because of the APK size.

So if your plugin needs appcompat library, you need to add the library manually.

ps. If you only add appcompat library, it might cause another error saying "Rejecting re-init on previously-failed class java.lang.Class" If this happens, try adding the support-v4 library too and hopefully it will be okay. (At least this works for me!)

Comment
Add comment · Show 6 · 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 wenderRondonia · Sep 20, 2017 at 02:48 PM 0
Share

how do i add that manually?

avatar image FShahinfar1 wenderRondonia · Sep 20, 2017 at 02:54 PM 1
Share

try copying from android sdk folder check this address "Android-SD$$anonymous$$\extras\android\m2repository\com\android\support" or you can search in sdk folder root.

avatar image wenderRondonia FShahinfar1 · Sep 20, 2017 at 03:47 PM 0
Share

found it sdk\extras\android\m2repository\com\android\support thanks

Show more comments
avatar image nmnsud wenderRondonia · Nov 21, 2017 at 03:29 PM 0
Share

And where to paste it? directly in Assets folder?

avatar image
0

Answer by unity_qj65t-V2DB8gZw · Mar 15, 2018 at 11:12 PM

I'm having the same problem and the solution seems to be no longer valid plus it is unclear as the comments point it out. I re-posted the (kind of) same problem on Stack Overflow: https://stackoverflow.com/questions/49309958/. You can comment on either places with more clarification about what to copy where with the latest tools.

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

9 People are following this question.

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

Related Questions

Use Android plugin with android support library dependency with gradle builds in Unity 5.5 1 Answer

Multiple plugin conflict 8 Answers

Extending the UnityPlayerActivity Java Code fail to build 1 Answer

When update android project from 2017 to 2018, I can't build it anymore 0 Answers

Unable to convert classes into dex format 1 Answer


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