googleads-mobile-unity
googleads-mobile-unity copied to clipboard
java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: java.lang.AbstractMethodError: abstract method "void androidx.lifecycle.DefaultLifecycleObserver.onCreate(androidx.lifecycle.LifecycleOwner)"
Been trying for a week to get 7.1.0 to run in our current project.
Any advice on how to fix this?
java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: java.lang.AbstractMethodError: abstract method "void androidx.lifecycle.DefaultLifecycleObserver.onCreate(androidx.lifecycle.LifecycleOwner)" at android.app.ActivityThread.installProvider(ActivityThread.java:7194) at android.app.ActivityThread.installContentProviders(ActivityThread.java:6672) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6567) at android.app.ActivityThread.access$1400(ActivityThread.java:224) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1887) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:224) at android.app.ActivityThread.main(ActivityThread.java:7562) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950) Caused by: androidx.startup.StartupException: java.lang.AbstractMethodError: abstract method "void androidx.lifecycle.DefaultLifecycleObserver.onCreate(androidx.lifecycle.LifecycleOwner)" at androidx.startup.AppInitializer.doInitialize(AppInitializer.java:187) at androidx.startup.AppInitializer.discoverAndInitialize(AppInitializer.java:238) at androidx.startup.AppInitializer.discoverAndInitialize(AppInitializer.java:206) at androidx.startup.InitializationProvider.onCreate(InitializationProvider.java:45) at android.content.ContentProvider.attachInfo(ContentProvider.java:2118) at android.content.ContentProvider.attachInfo(ContentProvider.java:2092) at android.app.ActivityThread.installProvider(ActivityThread.java:7189) ... 10 more Caused by: java.lang.AbstractMethodError: abstract method "void androidx.lifecycle.DefaultLifecycleObserver.onCreate(androidx.lifecycle.LifecycleOwner)" at androidx.lifecycle.FullLifecycleObserverAdapter.onStateChanged(FullLifecycleObserverAdapter.java:36) at androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent(LifecycleRegistry.java:354) at androidx.lifecycle.LifecycleRegistry.forwardPass(LifecycleRegistry.java:265) at androidx.lifecycle.LifecycleRegistry.sync(LifecycleRegistry.java:307) at androidx.lifecycle.LifecycleRegistry.moveToState(LifecycleRegistry.java:148) at androidx.lifecycle.LifecycleRegistry.handleLifecycleEvent(LifecycleRegistry.java:134) at androidx.lifecycle.ProcessLifecycleOwner.attach(ProcessLifecycleOwner.java:161) at androidx.lifecycle.ProcessLifecycleOwner.init(ProcessLifecycleOwner.java:106) at androidx.lifecycle.ProcessLifecycleInitializer.create(ProcessLifecycleInitializer.java:47) at androidx.lifecycle.ProcessLifecycleInitializer.create(ProcessLifecycleInitializer.java:31) at androidx.startup.AppInitializer.doInitialize(AppInitializer.java:180) ... 16 more
Hi @oddgames-david,
This looks like you are missing the lifecycle dependency. It is registered here.
- Make sure this xml config is correct.
- Try running 'Force Resolve' on the External Dependency Manager.
- If you still have issues, please let me know and include a full log, all version details (including Android), and potentially a minimal sample app.
Same issue on my side, Force Resolve but not work
Since there were no recent activities for this issue, we are therefore reluctantly going to close this bug for now.
If you are still experiencing the problem, please file a new issue with the same description, what happens and system / network tracing / Charles logs.
All system setups can be slightly different, so it's always better to open new issues and reference the related ones. Thanks for your contribution.
Hello, I'm having this issue, I have some old projects I'm trying to update with no luck. I then tried with samples/HelloProject and I can't make it work neither. I imported GoogleMobileAds-v8.4.1, AdColonyUnityAdapter-2.6.2, AppLovinUnityAdapter-6.8.0, InMobiUnityAdapter-4.3.0, IronSourceUnityAdapter-2.3.1, MetaAudienceNetworkUnityAdapter-3.10.0, TapjoyUnityAdapter-3.1.0, UnityAdsUnityAdapter-3.7.1.
I'm using Unity 2022.3.4f1.
I'm getting this warning on the console.
Some conflicting dependencies were found.
The following dependency versions were modified:
com.google.ads.mediation:adcolony:4.8.0.2 --> com.google.ads.mediation:adcolony:4+
com.google.ads.mediation:applovin:11.10.1.0 --> com.google.ads.mediation:applovin:11+
com.google.ads.mediation:facebook:6.14.0.0 --> com.google.ads.mediation:facebook:6+
com.google.ads.mediation:inmobi:10.5.4.1 --> com.google.ads.mediation:inmobi:10+
com.google.ads.mediation:ironsource:7.3.1.0 --> com.google.ads.mediation:ironsource:7+
com.google.ads.mediation:tapjoy:13.1.1.0 --> com.google.ads.mediation:tapjoy:13+
com.google.ads.mediation:unity:4.7.1.0 --> com.google.ads.mediation:unity:4+
com.google.android.gms:play-services-ads:22.2.0 --> com.google.android.gms:play-services-ads:+
com.google.android.ump:user-messaging-platform:2.0.0 --> com.google.android.ump:user-messaging-platform:+
The app crashes on startup. Please someone help.
I switched the Minimum API Level from 22 to 24 and that seems to have fixed this issue.
I'm now getting this error:
E Unity : MissingMethodException: Method not found: void GoogleMobileAds.Api.RequestConfiguration..ctor()
Any help will be much appreciated.