-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Cannot change resolution strategy of dependency configuration ':unityLibrary:aarArtifacts' after it has been resolved. #3042
Comments
I was getting a similar problem. There are 2 solutions:
|
I also have the same problem, any idea how to solve it? |
You can easily fix this issue by adding these lines to your mainTemplate.gradle:
|
This should be included in GoogleMobileAds v You may also try clearing your gradle cache. |
Got the same issue when implemented Google Admob version 8.6.0 and com.google.android.gms:play-services-ads:22.5.0 on Unity 2021.3.18. Any way to fix it |
this is work for me, thanks a lot <3 |
Thank You o great wizard this fixed the problem |
I'm also facing same issue. Any update ? Not using custom mainTempate.gradle Google Mobile Ads Unity plugin version: 8.6.0 |
+1 get this issue. This fix does not help me.
Unity 2021.3.29f1 UPD: It lets me build once when I change gradle to external or back to internal |
I'm having this issue as well. |
I can't update the mainTemplate.gradle as its currently disabled for me as i use a custom gradleTemplate. Is there something i need to do to replicate the same thing in this scenario? |
Hi, We are looking into this issue. |
OMG thanks you so much. It works for me. |
After this workaround I still have this errors in console: FAILURE: Build completed with 2 failures. 1: Task failed with an exception.
2: Task failed with an exception.
Can you help me to fix them? |
Hi everyone, Confirming this is an issue and we are looking into a fix. |
I managed to solve the issue by upgrading unity to 2022.3. See Google documentation |
He is a magician |
Thank you so much, it took me 3 days to fix it |
@NVentimiglia it isn't fixed. I have the same issue with the proposed workaround:
Unity 2021.3.34 |
Where?? I'm anxious seeing so many people get their issue solved by adding this, but I have no idea where to put this in my I tried in many places but the problem persists. Maybe I'm putting it in the wrong spot. |
I have it here:
|
I'm still having this issue in the latest update :/ Unity 2021.3.33f1 |
gradle.projectsEvaluated { it work in google mobile ads 8.6, but in version 8.7, it can not fix. how to fix? |
Unity 2020.3.48f1 Same here, the following workaround was working in 8.60 but does not work in 8.70 gradle.projectsEvaluated { |
I had same problem as you guys and fixed it by steps below: Unity version is 2021.3.26f1 Follow google document linked below like this: 1- download gradle version 6.7.1 binary file here: 2- Extract it anywhere and make unity use this one instead of default gradle installed with the editor. 3- In android player settings check custom "base" gradle template and not "main" gradle temple nor custom gradle properties. 4- Open the Assets/Plugins/Android/baseProjectTemplate.gradle file and set the dependencies to use Gradle build tools 4.2.0. 5- Force resolve your project using External dependency manager 1.2.177 and it should resolve successfully. 6- Make sure to check Use R8 in minify code section if needed and to not check release which causes other errors. 7- lastly from build menu press clean build which is under build button itself. Hope this helps. |
Thank you @AlirezaTabasi7, it works. |
I was getting this error after updating from a very old version of Unity Google Mobile Ads to 8.7.0. I fixed it by deleting the I then reinstalled the 8.7.0 package, force resolved all Android dependencies, and Android builds succeeded again. Perhaps some old Google Ads settings or files from prior versions were still in the project and were breaking the build, but this fixed it for me. |
Worked like a charm, but only after downgrading to 8.6.0. Couldn`t make 8.7.0 work... |
#3042 (comment) |
[REQUIRED] Step 1: Describe your environment
[REQUIRED] Step 2: Describe the problem
Steps to reproduce:
When targeting API 34 in Unity, I'm seeing the the following error while making a build. I have enabled both the options as mentioned here #2930 (comment)
The text was updated successfully, but these errors were encountered: