添加admob会导致不存在的错误.错误-java.lang.IllegalArgumentException:服务未注册:lt @ 777a78f [英] Adding an admob causes an error that does not exist. error - java.lang.IllegalArgumentException: Service not registered: lt@777a78f
问题描述
要使用Admob.
实施'com.Google.android.gms:play-services-adds:19.2.0'
我添加了这一部分.我添加了Menifest.
(我已经提交了正式的Admob文件.)
样本广告也不错.但是下面的错误消息不断出现.没什么大问题,或者应用程序关闭了..
2020-07-23 13:45:00.483 4068-4318/net.goldensize.bitthumbauto W/ConnectionTracker:解除绑定时引发异常java.lang.IllegalArgumentException:服务未注册:lt @ 777a78f在android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:1870)在android.app.ContextImpl.unbindService(ContextImpl.java:1848)在android.content.ContextWrapper.unbindService(ContextWrapper.java:755)在cg.b(:com.google.android.gms.dynamite_measurementdynamite @ 202414081 @ 20.24.14(120400-0):1)在cg.a(:com.google.android.gms.dynamite_measurementdynamite @ 202414081 @ 20.24.14(120400-0):6)在lu.A(:com.google.android.gms.dynamite_measurementdynamite @ 202414081 @ 20.24.14(120400-0):10)在lf.a(:com.google.android.gms.dynamite_measurementdynamite @ 202414081 @ 20.24.14(120400-0):3)在dz.run(:com.google.android.gms.dynamite_measurementdynamite @ 202414081 @ 20.24.14(120400-0):3)在java.util.concurrent.Executors $ RunnableAdapter.call(Executors.java:462)在java.util.concurrent.FutureTask.run(FutureTask.java:266)在ja.run(:com.google.android.gms.dynamite_measurementdynamite @ 202414081 @ 20.24.14(120400-0):6)
我想知道这是否与旧代码冲突.所以使用新项目创建一个空项目.
将admob添加到空项目.发生相同的错误.
实施'com.Google.android.gms:play-services-adds:19.2.0
如果只编写添加Admob的部分,则会产生相同的错误.
在这种情况下,有人尝试调试吗?
这让我有点发疯,直到我发现我在 build.gradle
中包括Firebase的方式如下:
实施平台('com.google.firebase:firebase-bom:25.12.0')实施'com.google.firebase:firebase-analytics'实施'com.google.firebase:firebase-crashlytics'...
Android Studio build.gradle 不,提示我更新到最新版本:
实施平台('com.google.firebase:firebase-bom:26.1.0')
进行此更新并再次检查以确认以前的版本后,警告已消失.
我认为firebase可能集成了一些核心的Google库,因此只需更新您的 com.google.android.gms:play-services-xxx
库,即可获得相同的修复程序>
希望这可以帮助某个人.
To use the Admob.
Implementation 'com.Google.android.gms:play-services-adds:19.2.0'
I added this part. I added Menifest.
(I've filed an official Admob document. )
Sample advertisement is also good. But the error message below kept coming up. There is no big problem or the app turns off..
2020-07-23 13:45:00.483 4068-4318/net.goldensize.bitthumbauto W/ConnectionTracker: Exception thrown while unbinding
java.lang.IllegalArgumentException: Service not registered: lt@777a78f
at android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:1870)
at android.app.ContextImpl.unbindService(ContextImpl.java:1848)
at android.content.ContextWrapper.unbindService(ContextWrapper.java:755)
at cg.b(:com.google.android.gms.dynamite_measurementdynamite@202414081@20.24.14 (120400-0):1)
at cg.a(:com.google.android.gms.dynamite_measurementdynamite@202414081@20.24.14 (120400-0):6)
at lu.A(:com.google.android.gms.dynamite_measurementdynamite@202414081@20.24.14 (120400-0):10)
at lf.a(:com.google.android.gms.dynamite_measurementdynamite@202414081@20.24.14 (120400-0):3)
at dz.run(:com.google.android.gms.dynamite_measurementdynamite@202414081@20.24.14 (120400-0):3)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at ja.run(:com.google.android.gms.dynamite_measurementdynamite@202414081@20.24.14 (120400-0):6)
I was wondering if it was a conflict with the old code. so Create an empty project with a new project.
Added admob to empty project. The same error occurs.
Implementation 'com.Google.android.gms:play-services-adds:19.2.0
If you just write the part where you add the Admob... The same error is generated.
In this case, has anyone tried debugging?
This was driving me slightly insane until I noticed that I include Firebase in my build.gradle
as follows:
implementation platform('com.google.firebase:firebase-bom:25.12.0')
implementation 'com.google.firebase:firebase-analytics'
implementation 'com.google.firebase:firebase-crashlytics'
...
Android Studio build.gradle was not prompting me to update to the latest version:
implementation platform('com.google.firebase:firebase-bom:26.1.0')
After making this update, and checking back to confirm with the previous version, the warning has disappeared.
I think firebase may integrate some of the core Google libraries, so possibly the same fix will be obtained simply by updating your com.google.android.gms:play-services-xxx
libraries
Hope this helps someone out there.
这篇关于添加admob会导致不存在的错误.错误-java.lang.IllegalArgumentException:服务未注册:lt @ 777a78f的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!