1.HtmlUnit 配置
依賴
implementation 'net.sourceforge.htmlunit:htmlunit:2.40.0'
2.常見問題
More than one file was found with OS independent path
工程生成了不止一個META-INF/DEPENDENCIES文件,看起來是因爲多個 jar 包裏包含了同樣的文件(DEPENDENCIES.txt),導致打包時因爲擔心相互覆蓋問題而提示出錯
在報該編譯錯誤的module的build.gradle中 android 屬性下 加入如下配置項,排除掉中間生成的DEPENDENCIES.txt文件
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
java.lang.BootstrapMethodError: Exception from call site #4 bootstrap method