OnCreate () is not called

I got a very strange problem, which I spend now, trying to solve. When I try to run an Android application (both on my phone and in the emulator), I get nothing. The activity icon from the AndroidManifest file (android: label = "@ string / list_name") is configured correctly, but otherwise I just have a blinking screen.

I inserted a breakpoint along with 30 Log.d () right after super () in my onCreate () method, but the breakpoint was never reached, and Log.d () was never printed. Also, I am not getting any exceptions in logcat.

The application worked before, and I don’t know how it can be that a breakpoint is never reached.

PS: This is my main activity.

PS2: I cleaned the project, rebuilt it, rebooted. The problem has not disappeared :(

PS3: My onCreate () is quite long, but here is how it starts:

@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.episode); Log.d("Very Strange", "This is never printed"); Log.d("Very Strange", "This is never printed"); // no breakpoints is every reached 

My manifest file can be found here: http://pastebin.com/UcKbYeGC

+4
source share
3 answers

Try the following:

  public void onCreate(Bundle savedInstanceState) { Log.d("Very Strange", "Printed #1?"); super.onCreate(savedInstanceState); Log.d("Very Strange", "Printed #2?"); setContentView(R.layout.episode); Log.d("Very Strange", "This is never printed"); Log.d("Very Strange", "This is never printed"); 

Just an offtopic tip: use the management version system to make sure you can roll back or compare the worker with the current

+2
source

The call to super() incorrect because it simply calls the empty constructor of the Activity class. You need to call the static super.onCreate() method to properly generate the action.

+1
source

Your activity myListView is the activity that was launched when the application started. It's right? Take another look at your manifest and specify the correct intent filter for the activity of your episodes (just cut / paste it from the MyListView entry into the manifest)

0
source

All Articles