Skip to content
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

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

Open
HassannKhan opened this issue Aug 24, 2024 · 13 comments
Assignees
Labels
needs-attention Need Googler's attention type: question

Comments

@HassannKhan
Copy link

[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.

@google-oss-bot
Copy link

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

@HassannKhan
Copy link
Author

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

@HassannKhan HassannKhan changed the title [Bug] [Bug] Could not create an instance of type org.gradle.initialization.DefaultSettings_Decorated. Could not initialize class org.codehaus.groovy.reflection.ReflectionCache Aug 25, 2024
@argzdev argzdev removed the new to be triaged label Aug 26, 2024
@argzdev argzdev self-assigned this Sep 6, 2024
@argzdev
Copy link
Collaborator

argzdev commented Sep 12, 2024

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 argzdev added the needs-info Need information for the developer label Sep 12, 2024
@google-oss-bot google-oss-bot added the stale Don't have recent activity label Sep 19, 2024
@google-oss-bot
Copy link

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!

@HassannKhan
Copy link
Author

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?

@google-oss-bot
Copy link

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.

@argzdev argzdev reopened this Sep 26, 2024
@argzdev argzdev removed stale Don't have recent activity needs-info Need information for the developer closed-by-bot labels Sep 26, 2024
@argzdev
Copy link
Collaborator

argzdev commented Sep 26, 2024

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 argzdev added the needs-info Need information for the developer label Sep 26, 2024
@HassannKhan
Copy link
Author

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

@google-oss-bot google-oss-bot added needs-attention Need Googler's attention and removed needs-info Need information for the developer labels Sep 28, 2024
@HassannKhan
Copy link
Author

APK link : (in case you wanna try it )

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

@binarynate
Copy link

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.

@HassannKhan
Copy link
Author

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

@HassannKhan
Copy link
Author

@argzdev any updates?

@jaypatel2227
Copy link

jaypatel2227 commented Oct 9, 2024

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.

@argzdev argzdev added type: bug type: question needs-attention Need Googler's attention and removed type: question needs-attention Need Googler's attention type: bug labels Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-attention Need Googler's attention type: question
Projects
None yet
Development

No branches or pull requests

5 participants