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

原创 2015年07月06日 22:03:01
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')

双击jar文件出现Could not find main class的解决办法

看此文前请保证jar包中有至少一个Main方法入口,及图形化的界面。 并保证META-INF/MANIFEST文件中的Main-Class已经指向之前实现的main方法入口。 最近硬盘坏了,于...
  • lw001x
  • lw001x
  • 2012年07月08日 01:01
  • 1286

Eclipse中的引用项目报Could not find *.apk!解决办法

转自http://www.cnblogs.com/wavky/p/3934549.html 百度上很多关于Could not find *.apk!这种编译报错的解决帖子,但是笔主在...

CVS报错:could not find desired version的解决办法

错误信息如下:**Errors have occurred while calculating the synchronization state for CVS Workspace. The se...

eclipse 调试时出现!MESSAGE Could not find bundle: org.eclipse.equinox.console解决办法

在用ECLIPSE调试OSGI时出现异常错误无法开打OSGI> [html] view plaincopyprint? !SESSION 2013-05-13 22:50:...

Error:(100, 0) Could not find method android() for arguments 解决办法

大家可能有过这种遭遇,从githu上下载了一个Android studio的工程,却无法在运行,总是出现各种各样的错误,这里笔者遇到了一种错误:Error:(100, 0) Could not fin...
  • xzj524
  • xzj524
  • 2017年01月25日 14:11
  • 2403

Struth2过滤报错“警告: Could not find action or result”解决办法

用Struth2框架时,如果浏览器中输入了struth.xml中没有定义的action时,会报一下错误: 警告: Could notfind action or result There is no ...

Strust2 中 Could not find action or result 原因分析及解决办法

最近在搞物业小区管理系统,

xcode报Could not find a storyboard named错误的解决办法

首先确定是否有用到storyboard, 如果没有用到的话,需要将涉及到story

Could not find the main class

  • 2012年12月04日 16:24
  • 28KB
  • 下载
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:Could not find class 'javax.naming.directory.InitialDirContext'的解决办法!
举报原因:
原因补充:

(最多只允许输入30个字)