Use adb logcat, DDMS, or the DDMS perspective in Eclipse to examine LogCat and look at the stack trace associated with your error.
Most likely, you do not have a widget with android:id="@+id/listView1" in your res/layout/main.xml file, but that is just a guess. On Tue, Apr 19, 2011 at 1:45 PM, fixus <[email protected]> wrote: > Hi List, > I`m new in developing android apps. > > Unfortunatly I have probles from start :( > > I`ve created code like this: > > package fix.main; > > import android.app.Activity; > import android.os.Bundle; > import android.widget.ArrayAdapter; > import android.widget.ListView; > > public class Starter extends Activity { > protected String[] items = {"jeden", "dwa", "trzy"}; > > /** Called when the activity is first created. */ > @Override > public void onCreate(Bundle savedInstanceState) { > super.onCreate(savedInstanceState); > setContentView(R.layout.main); > ListView lv = (ListView)findViewById(R.id.listView1); > lv.setAdapter(new ArrayAdapter<String>(this, R.layout.main, > items)); > } > } > > When I start it in the emulator I ALWAYS get a error that force me to > make "force close" > > I have this with every example of ListView from web. > > The standard HelloWorld works fine. What is wrong with this code ? > > Best regards, > Dawid "Fixus" Pacholczyk > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/android/ -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

