unity-jar-resolver icon indicating copy to clipboard operation
unity-jar-resolver copied to clipboard

[Bug] Could not create an instance of type org.gradle.initialization.DefaultSettings_Decorated. Could not initialize class org.codehaus.groovy.reflection.ReflectionCache

Open HassannKhan opened this issue 1 year ago • 14 comments

[REQUIRED] Please fill in the following fields:

  • Unity editor version: 6000.0.15f1
  • External Dependency Manager version: 1.2.182
  • Source you installed EDM4U: .unitypackage of applovin ads (.unitypackage or Unity Package Manager)
  • Features in External Dependency Manager in use: ANDROID RESOLVER (Android Resolver, iOS Resolver, VersionHandler, etc.)
  • Plugins SDK in use: APPLOVIN ADS SDK FOR UNITY (Firebase, Admob, Facebook, etc.)
  • Platform you are using the Unity editor on: WINDOWS (Mac, Windows, or Linux)

[REQUIRED] Please describe the issue here:

FAILURE: Build failed with an exception.

  • What went wrong: Could not create an instance of type org.gradle.initialization.DefaultSettings_Decorated.

Could not initialize class org.codehaus.groovy.reflection.ReflectionCache

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 3s

exit code: 1

(Please list the full steps to reproduce the issue. Include device logs, Unity logs, and stack traces if available.) MAKE AN EMPTY PROJECT using same unity version, Try to add applovin plugin and run ads. Resolver fails.

Please answer the following, if applicable:

What's the issue repro rate? (eg 100%, 1/5 etc) 100%. It sometimes works in a unpredictable way

What happened? How can we make the problem occur? Just download the same versions, make a project and try to run ads.

If you have a downloadable sample project that reproduces the bug you're reporting, you will likely receive a faster response on your issue.

Will do in a while.

HassannKhan avatar Aug 24 '24 06:08 HassannKhan

This issue does not seem to follow the issue template. Make sure you provide all the required information.

google-oss-bot avatar Aug 24 '24 06:08 google-oss-bot

what information is missing Mr BOT @google-oss-bot

HassannKhan avatar Aug 24 '24 06:08 HassannKhan

Hey @HassannKhan, thanks for reporting. I tried the steps you've provided, by adding the AppLovin Ads SDK (without adding the API key or adding ads) and then running the app, but I'm not encountering the issue. Is it necessary to add the ads to encounter this issue? I'm unable to proceed with the registration of an account in AppLovin Ads SDK since it requires an uploaded app.

argzdev avatar Sep 12 '24 16:09 argzdev

Hey @HassannKhan. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot avatar Sep 19 '24 01:09 google-oss-bot

Hey good sir, please don't rush to close the issue. Tell me what information do you need from me? Although I have given all the details of the issue. My project is using specified unity version as mentioned and it's using specified AppLovin's plugin version and External dependency manager.

When I try to resolve Android dependencies in my project, it fails. It does nothing on force resolve just gives a fake message. And on simple resolve option it gives errors as mentioned. You may not required applovin account since I am facing the issue with resolving the Android dependencies.

Tell me what unity version did you use?

HassannKhan avatar Sep 20 '24 21:09 HassannKhan

Since there haven't been any recent updates here, I am going to close this issue.

@HassannKhan if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

google-oss-bot avatar Sep 26 '24 01:09 google-oss-bot

Thanks for the extra details, @HassannKhan. I'm using the following versions.

  1. Unity Editor 6000.0.15f1
  2. AppLovin AppLovin-MAX-Unity-Plugin-7.0.0-Android-13.0.0-iOS-13.0.0.unitypackage
  3. External Dependency Manager 1.2.182

Perhaps, this issue is related to our old issues #699 where the resolution was to increase the versions for the following:

  1. Minimum API Level must be updated to at least 24
  2. Target API Level must be updated to at least 34

Could you try these and see if it makes any difference?

But there's likely a difference in our configuration which is causing a different behavior. Is there any chance you could share a minimal reproducible example so we can investigate this further?

argzdev avatar Sep 26 '24 14:09 argzdev

I made another empty project and set the API levels as per your instructions. Capture

Attached a screenshot. As you can see it says, resolution failed with some issue and on the other hand it says resolution succeed. A few files (GradleTemplate, mainTemplate, settingsTemplate) are added in the android folder of plugins folder which prevents the app from crashing. But the ads do not work. I have attached an empty project that contains one button and a script to run ads. This script is already running in my other apps.

Project download link :

https://drive.google.com/file/d/19Yc1og1_JKmf-GJiyglJa76noaX4Ow6s/view?usp=sharing

HassannKhan avatar Sep 28 '24 15:09 HassannKhan

APK link : (in case you wanna try it )

https://drive.google.com/file/d/1L1nPFMeVhe96KCpqDlvFaoQtUKfnzFBk/view?usp=sharing

HassannKhan avatar Sep 28 '24 17:09 HassannKhan

I just encountered this same error (Could not create an instance of type org.gradle.initialization.DefaultSettings_Decorated) with unity-jar-resolver v1.2.183 and Unity 2022.3.22, and I was able to work around it using the solution described in this Stack Overflow answer. I'm not sure if the issue is due to a bug in unity-jar-resolver or in Unity itself.

binarynate avatar Oct 02 '24 00:10 binarynate

@binarynate Sir your recommendation did not work in my case.

HassannKhan avatar Oct 07 '24 19:10 HassannKhan

@argzdev any updates?

HassannKhan avatar Oct 07 '24 20:10 HassannKhan

I just encountered this same error (Could not create an instance of type org.gradle.initialization.DefaultSettings_Decorated) i am using Firebase messaging and authentication, when i ForceResolve the libraries it's throw error Please help me to solve this issue.

jaypatel2227 avatar Oct 09 '24 08:10 jaypatel2227

Same problem. I've been trying to fix this for a week. Really frustrating. The force resolver isn't working.

Unity 6000.1 Image

WILEz75 avatar Sep 03 '25 12:09 WILEz75