#Force Resolve took hours to be done, and has errors

1 messages · Page 1 of 1 (latest)

lapis berry
#

I have a project using Unity 2022.3.45.f1 that is using essential kit v2, working great, but when I need the subscription feature I decided to upgrade it v3, it's giving my headache ever since, force resolve seems like infinite, never finished, after hours it gave errors, the build will failed as well, I tried to make a new project from blank now using Unity 6, it still have that infinite resolving, the errors it gave :


Failed to fetch the following dependencies:
com.google.firebase:firebase-analytics:21.3.0
com.google.firebase:firebase-analytics-unity:11.6.0
com.google.firebase:firebase-common:20.3.3
com.google.android.gms:play-services-base:18.2.0
com.google.firebase:firebase-app-unity:11.6.0
com.google.firebase:firebase-messaging:23.2.1
com.google.firebase:firebase-iid:21.1.0
com.google.flatbuffers:flatbuffers-java:1.12.0
com.google.firebase:firebase-messaging-unity:11.6.0
com.google.android.play:app-update:2.1.0
androidx.core:core-google-shortcuts:1.0.0+
androidx.work:work-runtime:2.7.1
com.android.billingclient:billing:7.1.1+
com.google.firebase:firebase-messaging:23.1.1+
androidx.exifinterface:exifinterface:1.3.0+
androidx.activity:activity:1.6.0+
androidx.core:core:1.7.0+
androidx.appcompat:appcompat:1.5.0+
androidx.appcompat:appcompat-resources:1.5.0+```

Help what should I do? tried AI, chatGPT it said it is my internet connection and tried to do some magic with gradle, but nothing works, my internet connection is fine, and I did this not once, multiple times for days already
brittle mango
#

Ok, can you please follow the below steps?

  1. Close and re-open unity
  2. Delete all .aar files in Assets/Plugins/Android folder
  3. Open Player Settings and enabled Main Template gradle and gradle properties options
  4. Force Resolve
  5. Build
lapis berry
#

okay I will try

#

there is nothing in my Assets/Plugins/Android folder

brittle mango
#

ok, then pls ignore that step
Btw, nothing? You mean empty Android folder?

lapis berry
#

for the blank project

brittle mango
#

ok, then make sure you have Assets/Plugins/Android folder

#

now just do the steps from 3

lapis berry
#

anyway since you're here, I need help with the last project instead, can we have a quick call so I can share my screen?

lapis berry
#

I think I did the step before, it did make the force resolve succeed, and then I can build the APK, however it will crash at launch

brittle mango
#

Do you have firebase plugins?

lapis berry
#

yes I do have

brittle mango
#

Looks like some config is missing realted to those

lapis berry
#

but it works at v2, should I delete the firebase?

brittle mango
#

Did you force resolve?

lapis berry
#

I did

brittle mango
lapis berry
#

it's for other things, I use the essential kit, purely for the IAP and webview

lapis berry
#

is there someway to make V2 works for subscription instead?

brittle mango
lapis berry
#

deleting the AARS, and force resolve and build

#

hope it works

brittle mango
#

Ok, Are you using google games sdk for leaderboards/achievements?

lapis berry
#

do I need it?

brittle mango
#

Not required.

#

We handle all automatically!

#

Just enable the feature in our settings and do a force resolve. Updating manifests, dependencies - all we handle automatically.

lapis berry
#

why do I have to enabled Main Template gradle and gradle properties options? Was it in installation guide or is my project that is weird?

brittle mango
#

why do I have to enabled Main Template gradle and gradle properties options? Was it in installation guide or is my project that is weird?
EDMU needs it. It's a plugin managed by Google for achieving cross plugin compatibility.

lapis berry
#

seems like the AAR is back to the plugins folder, should I delete them again?

#

same errors, do I delete the Jar now?

#

the aar and jar files keep added back

#

what do I do now? help pleaase @brittle mango

#

I disable the AAR and JAR, it built and crash at launch, log cat shows this about android gms

brittle mango
#

Can we have a quick remote session?

lapis berry
#

sure, that would be great

#

right now I'm trying to remove anything about firebase

brittle mango
#

ok!

lapis berry
#

I removed all the firebase inside the project, it still crashed at launch with the same error "FirebaseInitProvider"
so I blocked it in AndroidManifest added inside the Application tag : <provider android:name="com.google.firebase.provider.FirebaseInitProvider" android:authorities="io.nusameta.app.firebaseinitprovider" tools:node="remove" />

And it works now, the APK can run

I wonder what cause the FirebaseInitProvider to start? the only place that uses Firebase, after I check the mainTemplate.gradle is the VoxelBuster plugin itself

implementation 'com.google.firebase:firebase-messaging:23.1.1+' // Assets/Plugins/VoxelBusters/EssentialKit/Essentials/Editor/CrossPlatformEssentialKitDependencies.xml:18

so is that right? the Essential Kit 3 do the FirebaseInitProvider automatically? @brittle mango

brittle mango
#

Can you please pass me the final merged manifest file? Or an empty apk(without any scenes)?

lapis berry
#

the androidManifest inside the plugins->Android? basically there's nothing there, I'll give you empty apk

#

right now I removed the <provider android:name="com.google.firebase.provider.FirebaseInitProvider" android:authorities="io.nusameta.app.firebaseinitprovider" tools:node="remove" /> inside the androidManifest.xml and turn off the notification and worked

#

im building the empty scene

brittle mango
#

May I know what features are you using from our plugin?

lapis berry
#

Sharing, Webview, and Billing that is implemented

#

out of topic, how do you remove a subscription in Unity Editor after I bought it in Unity Editor just to test?

#

tried clearing playerpref, but it still shown as bought

brittle mango
#

If you are not using Notificaitons, pls disable it in our settings.

lapis berry
#

yes I got it disabled right now

#

seems like that was the problem after all

brittle mango
#

Can you try making a build now?

lapis berry
#

yes it build okay now after I turn off the notification service

brittle mango
#

Actually, if you need notifications, you should not do this

<provider android:name="com.google.firebase.provider.FirebaseInitProvider" android:authorities="io.nusameta.app.firebaseinitprovider" tools:node="remove" />

lapis berry
#

i thought notification can still be turned on, so only local

lapis berry
brittle mango
lapis berry
#

so the firebase error is actually from the notification here, it crashed at launch

lapis berry
brittle mango
brittle mango
#

Can we close this thread as the main problem of this post is resolved? If you have another issue, please open a new one.

lapis berry
#

thanks!

brittle mango
#

Thats ok 🙂

#

Anyways, if you hit any issue, pls open a new one. It helps others too.

lapis berry
hot viper
#

Hello, I’m using Unity 2022.3.62 and the latest version of Essential Kit. I only use IAP from Essential Kit. In my project, I also have AdMob and Firebase. When I use Essential Kit, the Force Resolve process takes forever. It doesn’t freeze, it looks like it’s still working, but even after hours it never finishes. How did you solve this?

brittle mango
#
  1. Quit Unity
  2. Remove any .aar files in Assets/Plugins/Android folder
  3. Re-open Unity
  4. Make sure "Main gradle template" option in EDMU Android settings is enabled (This is usually selected by default)
  5. Force Resolve

Let me know if you still face any issues. We can have a quick remote session.

hot viper
#

I am ready for remote session.

#

Still facing issues

brittle mango
#

Are you around?

hot viper
#

hello yes

brittle mango
#

Now?

hot viper
#

yes

#

now i will check every 10 min here :))

brittle mango
#

sorry

#

Pls install google chrome desktop and pass me access code

hot viper
#

okay

#

068391630423

brittle mango
#

still showing connecting

hot viper
#

231136995139

brittle mango
#

Nope 😐

hot viper
#

lets go google meet

brittle mango
#

ok

hot viper
#

i can share my screen

brittle mango
#

or zoom is also fine

#

anything

hot viper
#

okay sending link

brittle mango
#

airdroid

brittle mango
hot viper
brittle mango
#

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/internal/Preconditions;
at com.google.firebase.provider.FirebaseInitProvider.checkContentProviderAuthority(FirebaseInitProvider.java:85)
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(FirebaseInitProvider.java:60)
at android.app.ActivityThread.installProvider(ActivityThread.java:8220)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:7728)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7482)
at android.app.ActivityThread.access$1700(ActivityThread.java:310)

brittle mango
#

implementation("com.google.android.gms:play-services-basement:18.7.1")

hot viper
#

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
// Android Resolver Dependencies Start
implementation 'androidx.appcompat:appcompat:1.5.0+' // Assets/Plugins/VoxelBusters/EssentialKit/Essentials/Editor/CrossPlatformEssentialKitDependencies.xml:12
implementation 'androidx.appcompat:appcompat-resources:1.5.0+' // Assets/Plugins/VoxelBusters/EssentialKit/Essentials/Editor/CrossPlatformEssentialKitDependencies.xml:14
implementation 'androidx.constraintlayout:constraintlayout:2.1.4' // Assets/GoogleMobileAds/Editor/GoogleMobileAdsDependencies.xml:12
implementation 'androidx.core:core:1.7.0+' // Assets/Plugins/VoxelBusters/EssentialKit/Essentials/Editor/CrossPlatformEssentialKitDependencies.xml:9
implementation 'com.android.billingclient:billing:7.1.1+' // Assets/Plugins/VoxelBusters/EssentialKit/Essentials/Editor/CrossPlatformEssentialKitDependencies.xml:6
implementation 'com.android.support:appcompat-v7:25.3.1' // Facebook.Unity.Editor.AndroidSupportLibraryResolver.addSupportLibraryDependency
implementation 'com.android.support:cardview-v7:25.3.1' // Facebook.Unity.Editor.AndroidSupportLibraryResolver.addSupportLibraryDependency
implementation 'com.android.support:customtabs:25.3.1' // Facebook.Unity.Editor.AndroidSupportLibraryResolver.addSupportLibraryDependency
implementation 'com.android.support:support-v4:25.3.1' // Facebook.Unity.Editor.AndroidSupportLibraryResolver.addSupportLibraryDependency,

brittle mango
#

@hot viper Do you have any high level stripping enabled?

#

I see the added library class getting stripped in the final apk.

hot viper
#

@lapis berry how can you solve infinite force resolving? my force resolvings not ending.

brittle mango
#

@hot viper Did 3.4.2 work?

hot viper
#

no, i deleted all sdk from my project. only essential kit is inside. still not force resolving 🙁

brittle mango
#

Can we have a quick remote session

hot viper
#

okay i am ready

#

I tested Essential Kit (latest version) in a clean URP project (Unity 2022.3.62).
When I try to do a Force Resolve, the checkboxes for gradleTemplate.properties, mainTemplate.gradle, and settingsTemplate.gradle are automatically enabled.

If those checkboxes stay enabled resolve success but my project does not run on the device.
So I disable the Patch mainTemplate.gradle option and then try Force Resolve again. But in that case, Force Resolve never finishes – it keeps running forever.

My question:
👉 Is it possible to run a real Force Resolve with Essential Kit in a clean project (Unity 2022.3.62) without enabling mainTemplate.gradle patch?

If Force Resolve could complete successfully in that scenario, it would solve my issue.

hot viper
#

I deleted Firebase, Facebook, notifications, and purchases, and did a clean install. I also enabled various Gradle checkboxes as you suggested. It started working without any problems. Sorry for taking up your time. @brittle mango