-
Notifications
You must be signed in to change notification settings - Fork 363
[Bug][Android] Build failure after 2021.3.41f1 (AGP updated from 4.2.2 to 7.4.2) #699
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Unity Unity Default
For reference, this is the default contents of
|
Also, users are experiencing this error:
It seems to be caused by an old Kotlin version being used by some plugins, such as Firebase or Google Ads. Although setting the |
Thanks for reporting, @manugildev. I was able to reproduce the issue. Let me reach out to our engineers and see what we can do here. |
@argzdev Thanks! As mentioned before, the most complete solution would be to modify the unity-jar-resolver/source/AndroidResolver/src/GradleTemplateResolver.cs Lines 163 to 168 in 8e4659a
and instead use unity-jar-resolver/source/AndroidResolver/src/PlayServicesResolver.cs Lines 600 to 604 in 8e4659a
Another less elegant and more bug-prone solution would be something like:
|
Thank you for this suggestion, we really appreciate every contribution! I'll create a pull request with your changes, and get some feedback from our engineers. |
Hello! We have the same problem in preparing for Google own requirements. I suppose we are waiting this to be resolved on the next week? I really appreciate your time. We have 10+ projects and loaded development pipeline, with less than 1 month till deadline we have less and less time to finish. If we can help in any way - let me know! |
Thanks for raising this issue, and helping track down a sensible solution for it. I just pushed out a new release that checks against the AGP version instead of Unity version, https://github.com/googlesamples/unity-jar-resolver/releases/tag/v1.2.182 As for the issue with
![]()
Hopefully this will be fixed with the next 2021 release, and again, thanks for the assistance in identifying this issue. |
Unity |
[READ] For Firebase Unity SDK issues, please report to Firebase Unity Sample
Once you've read this section and determined that your issue is appropriate for this repository, please delete this section.
[REQUIRED] Please fill in the following fields:
2021.3.41f1
1.2.178
.unitypackage
Android Resolver
Firebase 12.1.0
Mac
[REQUIRED] Please describe the issue here:
Assets > External Dependency Manager > Android Resolver > Resolve
Please answer the following, if applicable:
What's the issue repro rate? 100%
What happened? How can we make the problem occur?
.apk
doesn't build because of gradle failures.Unity updated Gradle from
6.7.1
to7.5.1
and AGP from4.2.2
to7.1.2
in2021.3.41f1
. This is the root cause of the issue. For Gradle 7+ the plugin repositories need to be added tosettingsTemplate.gradle
, not tomainTemplate.gradle
.This condition in GradleTemplateResolver.cs needs to be updated to also include versions >= than 2021.3.41f1.
unity-jar-resolver/source/AndroidResolver/src/GradleTemplateResolver.cs
Line 166 in 8e4659a
An even better way of handling it would be to base that condition in the AGP version, instead of Unity version, and make it return true when
AGP >= 7.0.0
.More Info
→ See initial report on the Unity forums.
→ Reprodution project: failing_edm4u_2021_3_41f1.zip
The text was updated successfully, but these errors were encountered: