本文介绍了找不到类的twitter4j.http.AccessToken“的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我用twitter4j库,使与Twitter出头。但我有一个关于AccesToken类的问题。我检查了我的图书馆,但只有一个AccesToken类,它是在twitter4j.http
有没有其他的AccesToken类。
我的code的工作约10小时前,但现在不工作。我快要发疯:/
下面是我的日志跟踪:
15 04-24:53:32.767:E / dalvikvm(305):找不到类的twitter4j.http.AccessToken,从法com.twitterresim.TwitterOnay.isAuthenticated引用
04-24 15:53:32.767:W / dalvikvm(305):VFY:无法解析新实例67(Ltwitter4j / HTTP /的accessToken;)在LCOM / twitterresim / TwitterOnay;
04-24 15:53:32.767:D / dalvikvm(305):VFY:在更换运code 0x22×0010
04-24 15:53:32.767:D / dalvikvm(305):让LCOM / twitterresim / TwitterOnay复印件; .isAuthenticated code(124字节)
04-24 15:53:32.767:E / dalvikvm(305):找不到类的twitter4j.http.AccessToken,从法com.twitterresim.TwitterOnay.sendTweet引用
04-24 15:53:32.767:W / dalvikvm(305):VFY:无法解析新实例67(Ltwitter4j / HTTP /的accessToken;)在LCOM / twitterresim / TwitterOnay;
04-24 15:53:32.767:D / dalvikvm(305):VFY:在更换运code 0x22×0010
04-24 15:53:32.767:D / dalvikvm(305):让LCOM / twitterresim / TwitterOnay复印件; .sendTweet code(104字节)
04-24 15:53:32.767:D / AndroidRuntime(305):关闭VM
04-24 15:53:32.767:W / dalvikvm(305):主题ID = 3:螺纹未捕获的异常退出(组= 0x4001b188)
04-24 15:53:32.776:E / AndroidRuntime(305):未捕获的处理程序:螺纹主力退出,由于未捕获的异常
04-24 15:53:32.786:E / AndroidRuntime(305):java.lang.NoClassDefFoundError的:twitter4j.http.AccessToken
04-24 15:53:32.786:E / AndroidRuntime(305):在com.twitterresim.TwitterOnay.isAuthenticated(TwitterOnay.java:18)
04-24 15:53:32.786:E / AndroidRuntime(305):在com.twitterresim.TwitterPost.TwitterUpdate(TwitterPost.java:38)
04-24 15:53:32.786:E / AndroidRuntime(305):在com.twitterresim.TwitterResimActivity $ 1.onClick(TwitterResimActivity.java:23)
04-24 15:53:32.786:E / AndroidRuntime(305):在android.view.View.performClick(View.java:2364)
04-24 15:53:32.786:E / AndroidRuntime(305):在android.view.View.onTouchEvent(View.java:4179)
04-24 15:53:32.786:E / AndroidRuntime(305):在android.widget.TextView.onTouchEvent(TextView.java:6541)
04-24 15:53:32.786:E / AndroidRuntime(305):在android.view.View.dispatchTouchEvent(View.java:3709)
04-24 15:53:32.786:E / AndroidRuntime(305):在android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
04-24 15:53:32.786:E / AndroidRuntime(305):在android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
04-24 15:53:32.786:E / AndroidRuntime(305):在android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
04-24 15:53:32.786:E / AndroidRuntime(305):在android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
04-24 15:53:32.786:E / AndroidRuntime(305):在com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1659)
04-24 15:53:32.786:E / AndroidRuntime(305):在com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1107)
04-24 15:53:32.786:E / AndroidRuntime(305):在android.app.Activity.dispatchTouchEvent(Activity.java:2061)
04-24 15:53:32.786:E / AndroidRuntime(305):在com.android.internal.policy.impl.PhoneWindow $ DecorView.dispatchTouchEvent(PhoneWindow.java:1643)
04-24 15:53:32.786:E / AndroidRuntime(305):在android.view.ViewRoot.handleMessage(ViewRoot.java:1691)
04-24 15:53:32.786:E / AndroidRuntime(305):在android.os.Handler.dispatchMessage(Handler.java:99)
04-24 15:53:32.786:E / AndroidRuntime(305):在android.os.Looper.loop(Looper.java:123)
04-24 15:53:32.786:E / AndroidRuntime(305):在android.app.ActivityThread.main(ActivityThread.java:4363)
04-24 15:53:32.786:E / AndroidRuntime(305):在java.lang.reflect.Method.invokeNative(本机方法)
04-24 15:53:32.786:E / AndroidRuntime(305):在java.lang.reflect.Method.invoke(Method.java:521)
04-24 15:53:32.786:E / AndroidRuntime(305):在com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:860)
04-24 15:53:32.786:E / AndroidRuntime(305):在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
04-24 15:53:32.786:E / AndroidRuntime(305):在dalvik.system.NativeStart.main(本机方法)
解决方案
尝试重命名LIB文件夹名称为库。这解决了这个问题对我来说,点击这里:
I use twitter4j library to make somethings with twitter. But i have a problem about AccesToken class. I checked my libraries, there is only one AccesToken class and it is in twitter4j.http There are no other AccesToken class. My code was working about 10 hours ago, but now it doesn't work. I am about to go mad :/
Here is my log trace:
04-24 15:53:32.767: E/dalvikvm(305): Could not find class 'twitter4j.http.AccessToken', referenced from method com.twitterresim.TwitterOnay.isAuthenticated
04-24 15:53:32.767: W/dalvikvm(305): VFY: unable to resolve new-instance 67 (Ltwitter4j/http/AccessToken;) in Lcom/twitterresim/TwitterOnay;
04-24 15:53:32.767: D/dalvikvm(305): VFY: replacing opcode 0x22 at 0x0010
04-24 15:53:32.767: D/dalvikvm(305): Making a copy of Lcom/twitterresim/TwitterOnay;.isAuthenticated code (124 bytes)
04-24 15:53:32.767: E/dalvikvm(305): Could not find class 'twitter4j.http.AccessToken', referenced from method com.twitterresim.TwitterOnay.sendTweet
04-24 15:53:32.767: W/dalvikvm(305): VFY: unable to resolve new-instance 67 (Ltwitter4j/http/AccessToken;) in Lcom/twitterresim/TwitterOnay;
04-24 15:53:32.767: D/dalvikvm(305): VFY: replacing opcode 0x22 at 0x0010
04-24 15:53:32.767: D/dalvikvm(305): Making a copy of Lcom/twitterresim/TwitterOnay;.sendTweet code (104 bytes)
04-24 15:53:32.767: D/AndroidRuntime(305): Shutting down VM
04-24 15:53:32.767: W/dalvikvm(305): threadid=3: thread exiting with uncaught exception (group=0x4001b188)
04-24 15:53:32.776: E/AndroidRuntime(305): Uncaught handler: thread main exiting due to uncaught exception
04-24 15:53:32.786: E/AndroidRuntime(305): java.lang.NoClassDefFoundError: twitter4j.http.AccessToken
04-24 15:53:32.786: E/AndroidRuntime(305): at com.twitterresim.TwitterOnay.isAuthenticated(TwitterOnay.java:18)
04-24 15:53:32.786: E/AndroidRuntime(305): at com.twitterresim.TwitterPost.TwitterUpdate(TwitterPost.java:38)
04-24 15:53:32.786: E/AndroidRuntime(305): at com.twitterresim.TwitterResimActivity$1.onClick(TwitterResimActivity.java:23)
04-24 15:53:32.786: E/AndroidRuntime(305): at android.view.View.performClick(View.java:2364)
04-24 15:53:32.786: E/AndroidRuntime(305): at android.view.View.onTouchEvent(View.java:4179)
04-24 15:53:32.786: E/AndroidRuntime(305): at android.widget.TextView.onTouchEvent(TextView.java:6541)
04-24 15:53:32.786: E/AndroidRuntime(305): at android.view.View.dispatchTouchEvent(View.java:3709)
04-24 15:53:32.786: E/AndroidRuntime(305): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
04-24 15:53:32.786: E/AndroidRuntime(305): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
04-24 15:53:32.786: E/AndroidRuntime(305): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
04-24 15:53:32.786: E/AndroidRuntime(305): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
04-24 15:53:32.786: E/AndroidRuntime(305): at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1659)
04-24 15:53:32.786: E/AndroidRuntime(305): at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1107)
04-24 15:53:32.786: E/AndroidRuntime(305): at android.app.Activity.dispatchTouchEvent(Activity.java:2061)
04-24 15:53:32.786: E/AndroidRuntime(305): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1643)
04-24 15:53:32.786: E/AndroidRuntime(305): at android.view.ViewRoot.handleMessage(ViewRoot.java:1691)
04-24 15:53:32.786: E/AndroidRuntime(305): at android.os.Handler.dispatchMessage(Handler.java:99)
04-24 15:53:32.786: E/AndroidRuntime(305): at android.os.Looper.loop(Looper.java:123)
04-24 15:53:32.786: E/AndroidRuntime(305): at android.app.ActivityThread.main(ActivityThread.java:4363)
04-24 15:53:32.786: E/AndroidRuntime(305): at java.lang.reflect.Method.invokeNative(Native Method)
04-24 15:53:32.786: E/AndroidRuntime(305): at java.lang.reflect.Method.invoke(Method.java:521)
04-24 15:53:32.786: E/AndroidRuntime(305): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
04-24 15:53:32.786: E/AndroidRuntime(305): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
04-24 15:53:32.786: E/AndroidRuntime(305): at dalvik.system.NativeStart.main(Native Method)
解决方案
try renaming the "lib" folder name to "libs". That solved the issue for me, check here:https://github.com/ddewaele/AndroidTwitterSample/issues/2
这篇关于找不到类的twitter4j.http.AccessToken“的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!