Android Maven build gives trouble processing “javax/xml/namespace/QName.class”:

前端 未结 2 841
青春惊慌失措
青春惊慌失措 2021-01-02 05:18

Following error is showing in Maven console everytime I do Project -> Clean. Only the jar file is built in the target folder, apk

2条回答
  •  没有蜡笔的小新
    2021-01-02 05:38

    You can exclude implicit dependencies using the exclude-tag. QName seems to be in e.g. the xpp3 package. I solved this problem by adding the following exclusions to my pom (that already contained the dependency to google-api-client-googleapis):

    
      com.google.api.client
      google-api-client-googleapis
      1.4.1-beta
      
        
          commons-logging
          commons-logging
        
        
          xpp3
          xpp3
        
    
    
    

    If you need to find where the conflicting class files come from, run for example:

    for x in `find ~/.m2/repository/ -name \*.jar`; do jar tf $x|grep QName.class && echo "Found in: $x"; done`
    

提交回复
热议问题