Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6991975
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:34:29+00:00 2026-05-27T19:34:29+00:00

I have two activities with same name on two different packages. One is just

  • 0

I have two activities with same name on two different packages. One is just a subclass of another. I do this to use two different themes, depending on devices. (We use Theme.Dialog for larger screen device, and regular for others.) The inherited class only overrides onCreate to call its super method and set some window flags.

This works very well on all my devices, but I get very weird crash reports a few time.

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)

I did not create onCreateRegister so I assume it’s an internal name, but I am not sure. I use ProGuard but the line numbers should be showing if the recursive calls are by my code.

I can’t replicate it in any of my devices, and I get this report even from the same model I already test on, so it’s probably not a device-specific problem.

Does anybody have any idea why this is happening, or have a better way to handle this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T19:34:29+00:00Added an answer on May 27, 2026 at 7:34 pm

    I renamed my classes so the parent and child classes don’t the same name any more, and it seemed to have solved the problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two activities one displaying map view and another listview, the main objective
I have two different Search activities implemented with SearchManager in my app. One is
I have two different activities in two packages as following: com.my.application.MyActivity1 com.my.application.Test.MyActivity2 In my
Ive got two activities in the same application. the first one is with gui(main
I have two activities. The first one executes the second one. Intent i =
how can i switch between two activities wich have the same header, for example
I have two activities with exactly same intent filters and I would like to
I have two activities Menu (Activiy) Contents: Button1 ----> When this is pressed (a
Is it possible to share a same webview object in two different activities in
I have two Sharepoint lists: - Assignments - Activities The activities list has a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.