-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在 gradle 7.0.2 运行不起来 #17
Comments
研究了2天吧,最终解决方法就是在 root工程的gradle.properties添加:
原因:我觉得是 gradle 或者 agp 的bug,DocumentBuilderFactory#newInstance() 在找底层实现的时候,出现了同一个方法返回了两种实现一个是 com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl 另一个是 org.apache.xerces.jaxp.DocumentBuilderFactoryImpl 然后调用到 NodeUtils#adoptNode(Document document, Node node) 时 document和node来自不同的实现,adoptNode 就直接返回了NULL,后面就空指针了。 解决:DocumentBuilderFactory#newInstance() 再向下走创建实例的过程中有一步是查看是否设置了SystemProperty
直接通过gradle.properties定义下这个property,这样获取的实现就一致了 求助:DocumentBuilderFactory#newInstance() 后面的实例化 DocumentBuilderFactory 的过程中有使用ServiceLoader,
就是这个地方,出现了本插件使用流程中实例化查不到实现,其它情况能查到,哪位知道原因的话,烦请回复下。 |
java.lang.NullPointerException at com.android.ide.common.resources.NodeUtils.processSingleNodeNamespace(NodeUtils.java:186) at com.android.ide.common.resources.NodeUtils.updateNamespace(NodeUtils.java:147) ....
The text was updated successfully, but these errors were encountered: