Start a new topic

Android Activity not starting due to E/AndroidRuntime(1273)

Android Activity not starting due to E/AndroidRuntime(1273)
1 Comment


Hello everyone

The app I'm working on is based on a simple activity with a button that lauches the Architect view Activity.

it happens that when i hit the button, the app crashes.

Here is the way I have my code (switch statement in main activity):

public void onClick(View v) {

switch(v.getId()){

case R.id.openTourApp:

Intent launcher = new Intent(this, CameraFullActivity.class);

startActivity(launcher);

break;

}

}

 When i hit the button, the logcat stacktrace gives me this error:

E/AndroidRuntime(1273): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.joaopratas.tourapp/com.joaopratas.tourapp.CameraFullActivity}: java.lang.IllegalStateException: This method only has to be called right after the object has been constructed

I've been trying to fix this error for days and I can't seem to fix it.

Can someone please help me??
Login or Signup to post a comment