Android Activity.onCreate上的StackOverflower错误

Android Activity.onCreate上的StackOverflower错误,android,Android,我在两个不同的包上有两个同名的活动。一个只是另一个的子类。我这样做是为了使用两个不同的主题,具体取决于设备。(对于大屏幕设备,我们使用Theme.Dialog,对于其他设备,我们使用regular。)继承的类只覆盖onCreate来调用其超级方法并设置一些窗口标志 这在我所有的设备上都非常有效,但我有几次收到非常奇怪的崩溃报告 java.lang.StackOverflowError at *****.activities.Register.onCreate(SourceFile)

我在两个不同的包上有两个同名的活动。一个只是另一个的子类。我这样做是为了使用两个不同的主题,具体取决于设备。(对于大屏幕设备,我们使用Theme.Dialog,对于其他设备,我们使用regular。)继承的类只覆盖
onCreate
来调用其超级方法并设置一些窗口标志

这在我所有的设备上都非常有效,但我有几次收到非常奇怪的崩溃报告

java.lang.StackOverflowError
    at *****.activities.Register.onCreate(SourceFile)
    at *****.tablet.Register.onCreateRegister(SourceFile)
    (a lot of repeats)
    at *****.activities.Register.onCreate(SourceFile)
    at *****.tablet.Register.onCreateRegister(SourceFile)
    at *****.activities.Register.onCreate(SourceFile)
    at *****.tablet.Register.onCreateRegister(SourceFile)
    at *****.tablet.Register.onCreate(SourceFile)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
    at android.app.ActivityThread.access$1500(ActivityThread.java:117)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:130)
    at android.app.ActivityThread.main(ActivityThread.java:3683)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:507)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:850)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:608)
    at dalvik.system.NativeStart.main(Native Method)
我没有在CreateRegister上创建
onCreateRegister,所以我假设它是一个内部名称,但我不确定。我使用ProGuard,但是如果递归调用是由我的代码执行的,那么行号应该显示出来

我不能在我的任何设备上复制它,我甚至从我已经测试过的同一个模型上得到了这个报告,所以这可能不是特定于设备的问题

有没有人知道为什么会发生这种情况,或者有更好的方法来处理这种情况?

StackOverflower错误:

当正在运行的程序的堆栈深度超过某个值时引发 平台或虚拟机特定的限制。通常情况下,只有当 程序变得无限递归,但它也可以在 正确编写的(但非常递归的)程序


我不知道该告诉你在哪里使用这些信息,因为我还没有看到你的代码。但这将是一个Android/Java错误,可能不是你的错,或者你可能有一些递归的东西,你无法正确执行。

我重命名了我的类,这样父类和子类就不再同名了,似乎解决了这个问题