I have a small app like this
package com.ibuk.app;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
public class HelloActivity extends Activity
{
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}
That one works. But if I don't prefix the Activity class with public it throws the error Unfortunately app has stopped. Shouldn't a class be public by default? What's going on?
Aucun commentaire:
Enregistrer un commentaire