我正在使用 Twitter4J链接库并且运行良好,问题是没有收到错误 java.lang.ClassCastException 我必须在 seguite 上声明我的宣言:
<application> android:name=".TwitterApplication" </application>
在我这样做之后,API 工作得很好,但是构建了其他与 Twitter4J API 无关的类,并且我认为应用程序上下文存在问题。
如果我在另一个类中调用该方法finish();
,则没有任何反应,任何按钮都没有响应,如果我用一些文本填充超过 3 个 textViews,我会收到以下错误:(这当然是我在 auteração 中明确说明的原因)
我怎么能绕过这个!
01-11 03:32:20.629: E / AndroidRuntime (16968): FATAL EXCEPTION: main
01-11 03:32:20.629: E / AndroidRuntime (16968):
java.lang.RuntimeException: Unable to start activity ComponentInfo
{com.app.player / twitter.DetailsTweet}:
java.lang.ClassCastException: twitter4j.UserJSONImpl 01-11
03:32:20.629: E / AndroidRuntime (16968): at
android.app.ActivityThread.performLaunchActivity (ActivityThread.java:
1650) 01-11 03:32:20.629: E / AndroidRuntime (16968): at
android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:
1666) 01-11 03:32:20.629: E / AndroidRuntime (16968): at
android.app.ActivityThread.access $ 1500 (ActivityThread.java: 117)
01-11 03:32:20.629: E / AndroidRuntime (16968): at
android.app.ActivityThread $ H.handleMessage (ActivityThread.java:
931) 01-11 03:32:20.629: E / AndroidRuntime (16968): at
android.os.Handler.dispatchMessage (Handler.java: 99) 01-11
03:32:20.629: E / AndroidRuntime (16968): at android.os.Looper.loop
(Looper.java: 130) 01-11 03:32:20.629: E / AndroidRuntime (16968): at
android.app.ActivityThread.main (ActivityThread.java: 3689) 01-11
03:32:20.629: E / AndroidRuntime (16968): at
java.lang.reflect.Method.invokeNative (Native Method) 01-11
03:32:20.629: E / AndroidRuntime (16968): at
java.lang.reflect.Method.invoke (Method.java: 507) 01-11 03:32:20.629:
E / AndroidRuntime (16968): at com.android.internal.os.ZygoteInit $
MethodAndArgsCaller.run (ZygoteInit.java: 875) 01-11 03:32:20.629: E /
AndroidRuntime (16968): at com.android.internal.os.ZygoteInit.main
(ZygoteInit.java: 633) 01-11 03:32:20.629: E / AndroidRuntime (16968):
at dalvik.system.NativeStart.main (Native Method) 01-11 03:32:20.629:
E / AndroidRuntime (16968): Caused by: java.lang.ClassCastException:
twitter4j.UserJSONImpl 01-11 03:32:20.629: E / AndroidRuntime (16968):
at twitter.DetailsTweet.initObjects (DetailsTweet.java: 69) 01-11
03:32:20.629: E / AndroidRuntime (16968): at
twitter.DetailsTweet.onCreate (DetailsTweet.java: 40) 01-11
03:32:20.629: E / AndroidRuntime (16968): at
android.app.Instrumentation.callActivityOnCreate
(Instrumentation.java: 1047) 01-11 03:32:20.629: E / AndroidRuntime
(16968): at android.app.ActivityThread.performLaunchActivity
(ActivityThread.java: 1614) 01-11 03:32:20.629: E / AndroidRuntime
(16968): ... 11 more