Getting IllegalStateException on button click
The key part of the full stack trace is found here:
Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.example.unholyalliance.infinitestream/com.example.unholyalliance.infinitestream.Host}; have you declared this activity in your AndroidManifest.xml
It appears you do not have this Host
activity declared in your manifest file. Open AndroidManifest.xml
and check for or add the following:
<activity
android:name=".Host" />
Also make sure you fix the issue in Host
to first only declare your TextView
and then assign the value in onCreate()
after setContentView()
.
private TextView service_status;
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_host);
service_status = (TextView) findViewById(R.id.textView1);
...
}