生成失败,错误为无法访问隐藏



当我重新启动Android时,我突然开始出现以下错误。

我尝试过Clean Build、Rebuild、Invalidate Cache等,但都没有成功。还遵循了在各个网站上给出的一些输入,以了解真正的问题。我用--scan运行了编译器,得到了以下问题的详细信息。

error: cannot access Hide
class file for com.google.android.gms.common.internal.Hide not found
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
:app:compileDebugJavaWithJavac FAILED
:app:buildInfoGeneratorDebug
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org

请指导如何解决这个问题。突然出了什么问题。

最终得到了调用此类的问题。

这是实现"com.google.android.gms:play服务广告:15.0.0"到17.0.0 的更新

我从这个问题中学到了一件事,永远不要把多个更新库放在一起,因为它开始产生问题,以后很难找到。一次更新一个,构建apk,然后尝试其他更新。

我能够通过更新我的谷歌和firebase库来解决这个问题。

因此,如果你遇到这个错误,请在build.gradle.中更新你的谷歌gms库和firebase库

以下是我在2019年7月更新到以下版本的内容:

com.google.firebase:firebase-auth 18.1.0
com.google.firebase:firebase-core 17.0.1
com.google.firebase:firebase-messaging 19.0.0
com.google.firebase:firebase-storage 18.1.0
com.google.android.gms:play-services-auth 18.1.0

您的firebase库彼此不兼容。

请参阅官方文档添加您的库。

同时,我能够使用下面的库版本来解决我的问题。

implementation 'com.google.firebase:firebase-auth:19.2.0'
implementation 'com.google.firebase:firebase-analytics:17.2.2'
implementation 'com.google.firebase:firebase-messaging:20.1.0'
implementation 'com.google.firebase:firebase-storage:19.1.1'
implementation 'com.google.firebase:firebase-firestore:21.4.0'
implementation 'com.google.android.gms:play-services-auth:17.0.0'
implementation 'com.firebaseui:firebase-ui-firestore:6.2.0'

最新更新