Adding an admob causes an error that does not exist. error – java.lang.IllegalArgumentException: Service not registered: lt@777a78f

huangapple 未分类评论49阅读模式
英文:

Adding an admob causes an error that does not exist. error - java.lang.IllegalArgumentException: Service not registered: lt@777a78f

问题

使用Admob。

Implementation 'com.Google.android.gms:play-services-adds:19.2.0'

我添加了这部分。我添加了清单文件。

(我已经查阅了官方的Admob文档。)

示例广告也是好的。但是下面的错误消息一直出现。
没有什么大问题,也没有导致应用关闭。

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)

我想知道这是否与旧代码冲突。所以
创建一个空项目作为新项目。

在空项目中添加admob。
同样的错误出现。

Implementation 'com.Google.android.gms:play-services-adds:19.2.0'

如果只写添加Admob的部分... 仍然会产生相同的错误。

在这种情况下,有人尝试过调试吗?

英文:

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?

答案1

得分: 0

这让我稍微有点疯狂,直到我注意到我在build.gradle中如下方式引入了Firebase:

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没有提示我更新到最新版本:

implementation platform('com.google.firebase:firebase-bom:26.1.0')

在进行了此更新后,并且确认回顾了先前的版本,警告消失了。

我认为Firebase可能会集成一些核心的Google库,所以可能通过更新你的com.google.android.gms:play-services-xxx库来获得相同的修复。

希望对某个人有所帮助。

英文:

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.

huangapple
  • 本文由 发表于 2020年7月23日 12:59:42
  • 转载请务必保留本文链接:https://java.coder-hub.com/63047174.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定