关闭

Could not find class 'javax.naming.directory.InitialDirContext'的解决办法!

标签: javax.naming java an
1743人阅读 评论(3) 收藏 举报
分类:
07-06 22:02:22.750    2821-3659/? E/dalvikvm﹕ Could not find class 'javax.naming.directory.InitialDirContext', referenced from method org.jivesoftware.smack.util.dns.javax.JavaxResolver.<clinit>
07-06 22:02:22.750    2821-3659/? W/dalvikvm﹕ VFY: unable to resolve new-instance 7453 (Ljavax/naming/directory/InitialDirContext;) in Lorg/jivesoftware/smack/util/dns/javax/JavaxResolver;
07-06 22:02:22.755    2821-3659/? I/dalvikvm﹕ Could not find method javax.naming.directory.DirContext.getAttributes, referenced from method org.jivesoftware.smack.util.dns.javax.JavaxResolver.lookupSRVRecords
07-06 22:02:22.755    2821-3659/? W/dalvikvm﹕ Exception Ljava/lang/NoClassDefFoundError; thrown while initializing Lorg/jivesoftware/smack/util/dns/javax/JavaxResolver;
07-06 22:02:22.830    2821-3659/? I/dalvikvm﹕ Could not find method javax.security.sasl.Sasl.createSaslClient, referenced from method org.jivesoftware.smack.sasl.javax.SASLJavaXMechanism.authenticateInternal
07-06 22:02:22.830    2821-3659/? W/dalvikvm﹕ VFY:  rejected Lorg/jivesoftware/smack/sasl/javax/SASLJavaXMechanism;.authenticateInternal ()V
07-06 22:02:22.830    2821-3659/? W/dalvikvm﹕ VFY:  rejected Lorg/jivesoftware/smack/sasl/javax/SASLJavaXMechanism;.authenticateInternal ()V
07-06 22:02:22.830    2821-3659/? W/dalvikvm﹕ Verifier rejected class Lorg/jivesoftware/smack/sasl/javax/SASLJavaXMechanism;
07-06 22:02:22.830    2821-3659/? W/dalvikvm﹕ Exception Ljava/lang/VerifyError; thrown while initializing Lorg/jivesoftware/smack/SmackInitialization;

07-06 22:02:22.830    2821-3659/? W/dalvikvm﹕ Exception Ljava/lang/VerifyError; thrown while initializing Lorg/jivesoftware/smack/provider/ProviderManager;


-------------------------------------------------以上是我的logcat部分内容------------------------------------------------------


在用smack做开发是发现android studio 不能加载javax.naming包。目前未找到解决方法。


http://blog.csdn.net/du412983021/article/details/46602409 某君的解决方法。


这个应该是加载了不能再安卓上运行的jar包;以下是我的jar包,没问题;

compile files('lib/minidns-0.1.7.jar')
compile files('lib/smack-android-4.2.0-alpha1.jar')
compile files('lib/smack-core-4.2.0-alpha1.jar')
compile files('lib/smack-extensions-4.2.0-alpha1.jar')
compile files('lib/smack-im-4.2.0-alpha1.jar')
compile files('lib/smack-resolver-minidns-4.2.0-alpha1.jar')
compile files('lib/smack-sasl-provided-4.2.0-alpha1.jar')
compile files('lib/smack-tcp-4.2.0-alpha1.jar')
compile files('lib/xpp3-1.1.4c-withnoQname.jar')
compile files('lib/jxmpp-jid-0.5.0-alpha1.jar')
compile files('lib/jxmpp-util-cache-0.5.0-alpha1.jar')
compile files('lib/jxmpp-core-0.5.0-alpha1.jar')
compile files('lib/smack-android-extensions-4.2.0-alpha1.jar')
compile files('lib/smack-java7-4.2.0-alpha1.jar')

1
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:14947次
    • 积分:279
    • 等级:
    • 排名:千里之外
    • 原创:12篇
    • 转载:5篇
    • 译文:0篇
    • 评论:4条
    文章分类
    文章存档
    最新评论