1

I import HoloEveryWhere and HoloEverywhere Addon Roboguice then i added HoloEveryWhere to the HoloEverywhere Addon Roboguice and every thing is fine no error.In my project i added HoloEverywhere Addon Roboguice . Now if i want to make an Activity what Activity should I extend ? i tried

public class HomeActivity extends IAddonActivity{

...
..
..
}

I got ClassCastException

full stackTrace

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

which class should i extend to have an Activity

to be able to use HoloEveryWhere and RoboGuice together .

user4o01
  • 2,688
  • 4
  • 39
  • 54

0 Answers0