1

我导入HoloEveryWhereHoloEverywhere Addon Roboguice然后我添加HoloEveryWhereHoloEverywhere Addon Roboguice,一切都很好,没有错误。在我的项目中,我添加了HoloEverywhere Addon Roboguice . 现在如果我想做一个Activity什么活动我应该扩展?我试过了

public class HomeActivity extends IAddonActivity{

...
..
..
}

我有ClassCastException

全栈跟踪

09-16 14:54:11.324: E/AndroidRuntime(16138): FATAL EXCEPTION: main
09-16 14:54:11.324: E/AndroidRuntime(16138): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.testingroboguicewithholoeverywhere/com.example.testingroboguicewithholoeverywhere.BaseActivity}: java.lang.ClassCastException: com.example.testingroboguicewithholoeverywhere.BaseActivity cannot be cast to android.app.Activity
09-16 14:54:11.324: E/AndroidRuntime(16138):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2137)
09-16 14:54:11.324: E/AndroidRuntime(16138):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
09-16 14:54:11.324: E/AndroidRuntime(16138):    at android.app.ActivityThread.access$600(ActivityThread.java:141)
09-16 14:54:11.324: E/AndroidRuntime(16138):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
09-16 14:54:11.324: E/AndroidRuntime(16138):    at android.os.Handler.dispatchMessage(Handler.java:99)
09-16 14:54:11.324: E/AndroidRuntime(16138):    at android.os.Looper.loop(Looper.java:137)
09-16 14:54:11.324: E/AndroidRuntime(16138):    at android.app.ActivityThread.main(ActivityThread.java:5103)
09-16 14:54:11.324: E/AndroidRuntime(16138):    at java.lang.reflect.Method.invokeNative(Native Method)
09-16 14:54:11.324: E/AndroidRuntime(16138):    at java.lang.reflect.Method.invoke(Method.java:525)
09-16 14:54:11.324: E/AndroidRuntime(16138):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
09-16 14:54:11.324: E/AndroidRuntime(16138):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
09-16 14:54:11.324: E/AndroidRuntime(16138):    at dalvik.system.NativeStart.main(Native Method)
09-16 14:54:11.324: E/AndroidRuntime(16138): Caused by: java.lang.ClassCastException: com.example.testingroboguicewithholoeverywhere.BaseActivity cannot be cast to android.app.Activity
09-16 14:54:11.324: E/AndroidRuntime(16138):    at android.app.Instrumentation.newActivity(Instrumentation.java:1061)
09-16 14:54:11.324: E/AndroidRuntime(16138):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2128)
09-16 14:54:11.324: E/AndroidRuntime(16138):    ... 11 more

class我应该扩展哪个Activity

能够HoloEveryWhereRoboGuice一起使用。

4

0 回答 0