当我重新启动 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-services-ads:15.0.0”更新为 17.0.0
我从这个问题中学到的一件事是,永远不要将多个更新库放在一起,因为开始创建问题将是以后查找的挑战。一次更新一个,构建 apk,然后尝试其他更新。
关于java - 构建失败,错误无法访问隐藏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53132336/