本文介绍了Firestore:库中无效的程序包引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
更新为com.google.firebase:firebase-firestore:16.0.0
后,出现以下棉绒错误:
After updating to com.google.firebase:firebase-firestore:16.0.0
I get the following lint error:
Error: Invalid package reference in library; not included in Android: javax.naming.directory. Referenced from io.grpc.internal.DnsNameResolver.JndiResolver. [InvalidPackage]
Error: Invalid package reference in library; not included in Android: javax.naming. Referenced from io.grpc.internal.DnsNameResolver.JndiResolver. [InvalidPackage]
似乎grpc
依赖性使lint
不满意.我该如何解决?
Seems that the grpc
dependency is making lint
unhappy. How can I solve this?
推荐答案
您可以通过在lint.xml
文件中设置以下内容来消除此错误:
You can remove this error by setting the following content in a lint.xml
file:
<?xml version="1.0" encoding="UTF-8"?>
<lint>
<issue id="InvalidPackage">
<ignore path="*/io.grpc/grpc-core/*"/>
</issue>
</lint>
lint.xml
应该位于您的 application 模块的根目录.
The lint.xml
should be at the root of your application module.
相对于将错误降级为警告的优势在于,如果您以后碰巧添加了一个确实具有无效软件包的依赖项,那么您仍然会得到错误.
The advantage over demoting the error to a warning is that if you later happen to add a dependency which really have an invalid package, you will still get the error.
这篇关于Firestore:库中无效的程序包引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!