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

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')

阅读更多
文章标签: javax.naming java an
个人分类: android-smack
相关热词: 火狐could
下一篇android studio错误解决finished with non-zero exit value 1 【javax/xml/namespace/QName.class】
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭