android signed apk / net.sourceforge.jtds errors

三世轮回 提交于 2020-08-05 08:58:40

问题


I'm trying to build a signed apk (release) using proguard, but when generating the APK android studio reports several warnings related to "net.sourceforge.jtds" like this:

Warning:net.sourceforge.jtds.jdbcx.JtdsDataSource: can't find superclass or interface javax.sql.XADataSource

Warning:net.sourceforge.jtds.jdbcx.JtdsDataSource: can't find superclass or interface javax.naming.Referenceable

...

and finally ends with an error:

Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'. java.io.IOException: Please correct the above warnings first.

do I have to configure proguard to "ignore" jtds? how ?

any help would be greatly appreciated.


回答1:


The warning means that you are missing some dependent libraries. The missing classes (javax.naming.Referenceable or javax.sql.XADataSource) are present in a standard Java 7 SDK, but not in the android.jar (as you are building for android).

I am not aware if the used library (jtds) works well with Android, but in case it does you can add the following to your configuration to instruct ProGuard to ignore the warnings:

-dontwarn net.sourceforge.jtds.**

Otherwise you might need to add the missing libraries for android, e.g. jndi.



来源:https://stackoverflow.com/questions/38268898/android-signed-apk-net-sourceforge-jtds-errors

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!