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 ahere · Oct 31, 2019 at 03:31 PM · androidandroid buildandroidpluginlibraries

Gradle Build error : Could not resolve all files for configuration ':releaseCompileClasspath'.

Hey guys I recently updated my facebook SDK and due to merge conflicts when building the app caused by the extra libraries that had to be added to the project by the Play Services Resolver I had to edit my Gradle.properties file to look like below.

 org.gradle.jvmargs=-Xmx4096M
 android.useAndroidX=true
 android.enableJetifier=true

I did this mainly cause some of the support libraries were the cause of the merge conflicts. But now I keep getting the following error and I do not know how to fix it. Any help will be appreciated. Thanks!

 * What went wrong:
     Execution failed for task ':preReleaseBuild'.
     > Could not resolve all files for configuration ':releaseCompileClasspath'.
        > Failed to transform artifact 'com.android.support.support-v4-27.0.2.aar (:com.android.support.support-v4-27.0.2:)' to match attributes {artifactType=android-manifest}
           > Execution failed for JetifyTransform: D:\Unity\Projects\Mzito-NewBG\2017.3\Mzito - Unity 2018.1.2f1 - GameTrove\Mzito\Temp\gradleOut\libs\com.android.support.support-v4-27.0.2.aar.
              > Failed to transform 'D:\Unity\Projects\Mzito-NewBG\2017.3\Mzito - Unity 2018.1.2f1 - GameTrove\Mzito\Temp\gradleOut\libs\com.android.support.support-v4-27.0.2.aar' using Jetifier. Reason: The given artifact contains a string literal with a package reference 'android.support.v4' that cannot be safely rewritten. Libraries using reflection such as annotation processors need to be updated manually to add support for androidx.. (Run with --stacktrace for more details.)

Comment
Add comment · Show 4
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 justFin · Sep 11, 2020 at 12:15 AM 1
Share

Hi there! I'm having the same error since adding firebase to my Unity 2019.3.14f1 project. Just wondering if you found a solution? Thanks, Fin.

avatar image Natasha_P justFin · Oct 15, 2020 at 05:21 PM 0
Share

Hello Fin! Did you find any solution? I have the exact same problem (adding Firebase) and use the same Unity version.

avatar image justFin Natasha_P · Oct 15, 2020 at 09:38 PM 0
Share

Hi Natasha! I did manage to solve the issue! If I remember correctly for me the issue was caused by a conflict with the $$anonymous$$apbox SDK including an older version of the Google support library... I'll double-check this tomorrow and post some more info!

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by justFin · Oct 16, 2020 at 07:50 PM

For me, this issue was caused by having the Mapbox SDK versions of some libraries clashing with new Android X libraries. I was able to solve this by manually "Jetifying" two files:

  1. Mapbox/Core/Plugins/Android/mapbox-android-telemetry-2-1-0.aar

  2. Mapbox/Unity/Location/Plugins/Android/com.mapbox.android.unity-debug.aar.

This is further explained in this post: https://github.com/mapbox/mapbox-unity-sdk/issues/1438

I also had to entirely remove/delete the following files from Mapbox\Core\Plugins\Android:

  1. appcompat-v7-25.1.0.aar

  2. com.mapbox.android.unity-debug.aar

  3. libtelemetry-full-release.aar

  4. MapboxDependencies.xml

  5. support-compat-25.1.0.aar

  6. support-core-ui-25.1.0.aar

  7. support-core-utils-25.1.0.aar

  8. support-v4-25.1.0.aar

Here are some other posts that helped my find a solution: https://github.com/mapbox/mapbox-unity-sdk/issues/646, https://stackoverflow.com/questions/62375030/unity-android-cant-build-firebase-and-mapbox-project


I hope this helps @Natasha_P, and anyone else who might experience this same issue!

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 Natasha_P · Oct 17, 2020 at 12:23 AM 0
Share

Thank you so much @justFin ! It worked like a charm! Deleting the .aar files did the job and the android app was able to link to Firebase without problems caused by duplicate classes and conficting SDKs :)

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

252 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 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 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 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 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 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 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 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 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 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 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 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 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 avatar image avatar image avatar image avatar image avatar image

Related Questions

java.lang.ClassNotFoundException while running Android activity 2 Answers

Cannot Convert Classes to dex format 2 Answers

AndroidManifest.xml file locations 1 Answer

why unity not resolving aar and jar files 0 Answers

how can I install the android platform support in Linux? 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