Error: cannot access zzbgl

不打扰是莪最后的温柔 提交于 2019-11-28 13:55:19

The Google API Release Notes indicate that support for the combined play-services library ended in April 2018:

Starting with 15.0.0, there will no longer be a play-services alias target to pull in all Google Play services components. This has been recommended against for some time.

You can no longer specify a single dependency on the combined Google Play services target like this anymore:

implementation 'com.google.android.gms:play-services:12.0.1'.

When this was supported with previous versions, it pulled in ALL the Google Play libs way more than you need. See the list of APIs in Table 1 of the Setup Guide and include only the specific ones your app uses.

A check of the Google Maven Repository confirms that version 12.0.1 was the last version of the combined play-services target.

So please delete the above implementation and use only:

implementation "com.google.android.gms:play-services-base:15.0.1"

If you are also using other play services, please add them as separate dependencies.

I think your main reason for the error is that you are using 2 different versions for play services libraries

        implementation 'com.google.android.gms:play-services:12.0.1'

Here it is 12.0.1

        implementation "com.google.android.gms:play-services-base:15.0.1"

While here it is 15.0.1.

Try to use same version of related libraries everywhere.

Just simply you need to change a Dependency because 12.0.1 is no more

implementation 'com.google.android.gms:play-services:12.0.1'

To

implementation 'com.google.android.gms:play-services-base:15.0.1'

And press sync Gradle

Hope this may help you

updates the version of all dependencies. Generally, this error will happen if you are working with several new and old dependencies.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!