1
我試圖添加外部jar文件到我的android項目。這些外部罐子互相依賴,有些是依賴另一個,所以當有一個類位於另一個jar文件中的引用時,android studio會爲該類引發java.lang.NoClassDefFoundError。在android項目中添加外部依賴jar文件
什麼是在Android項目中使用這些罐子的正確解決方案?
compile files('libs/gt-shapefile-2.7.5.jar')
compile files('libs/gt-metadata-2.7.5.jar')
compile files('libs/gt-data-2.7.5.jar')
compile files('libs/gt-main-2.7.5.jar')
compile files('libs/gt-api-2.7.5.jar')
compile files('libs/gt-referencing-2.7.5.jar')
compile files('libs/vecmath-1.3.2.jar')
compile files('libs/commons-pool-1.5.4.jar')
compile files('libs/gt-opengis-2.7.5.jar')
compile files('libs/jsr-275-1.0-beta-2.jar')
compile files('libs/jts-1.11.jar')
compile files('libs/jdom-1.0.jar')
compile files('libs/jai_core-1.1.3.jar')
compile files('libs/hsqldb-1.8.0.7.jar')
compile files('libs/gt-epsg-hsql-2.7.5.jar')
你可以參考這個答案,其中包括許多approuches。 https://stackoverflow.com/a/35369267/7592874 – Zacktamondo
我做到了,沒有結果,並得到相同的錯誤 –
@alirezarahmaty我認爲你應該確保這些庫也在其他庫內部實現。 – Zacktamondo