Friday 15 August 2014

android - First activity won't run on AVD -


I made an application, my first, and I'm having trouble walking on Aveedi. Will not load the first activity, simply say "Unfortunately, FussyFestivalrV7 The main initial activity is stopped:

  Package com.example.fussyfestivalr; Import android App Import android.content.Intent; Importroid.os.Bundle; Import android.view.View; Import android.widget.Button; Public Square MainActivity Extension Activity {@Override Public Zero OnCreate (bundled savedInstanceState) {super.onCreate (savedInstanceState); SetContentView (R.layout.activity_main); Button switch button = (button) VVBIID (R.B. button 1); switchButton.setOnClickListener (New View.OnClickListener () {@Override see public void onClick (v) {Intent intent = new Intent (MainActivity.this, News.class); startActivity (intent);}}); }}  

and my layout

  & lt; RelativeLayout xmlns: android = "http://schemas.android.com/apk/res/android" xmlns: device = "http://schemas.android.com/tools" Android: layout_width = "match_parent" Android: layout_height = "Match_parent" Android: background = "@ string / title" tool: reference = "$ {} relativePackage. $ {Action class}" & gt; & Lt; TextView android: id = "@ + id / title" Android: Layout_width = "Wrap_content" Android: Layout_height = "Wrap_content" Android: layout_alignParentTop = "true" Android: layout_centerHorizontal = "true" android: text = "@ string / Title" Android: Text Appointment = "? Android: ATR / Text Appointment Large" /> & Lt; Button android: id = "@ + id / newsbutton" Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" Android: layout_below = "@ + id / title" Android: layout_centerHorizontal = "true" Android: layout_marginTop = "35 DP "Android: Text =" @ String / News "/> & Lt; Button Android "Android: attr / buttonStyleSmall" id = "@ + id / Exit" style = Android: Layout_width = "Wrap_content" Android: Layout_height = "Wrap_content" Android: layout_alignParentBottom = "true" Android: Layout_marginBottom = "L7dp" Android: layout_toRightOf = "@ + id / title" android: text = "@ string / exit" / & gt; & Lt; Button android: id = "@ + id / band" Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" Android: layout_above = "@ + id / Exit" Android: layout_centerHorizontal = "true" Android: layout_marginBottom = " 44 DP "Android: Text =" @ String / Band "/> & Lt; Button android: id = "@ + id / fafq" Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" Android: layout_above = "@ + id / band" Android: layout_centerHorizontal = "true" Android: layout_marginBottom = "53 DP "Android: Text =" @ String / FAFX "/> & Lt; Button android: id = "@ + id / profile" Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" Android: layout_above = "@ + id / fafq" Android: layout_centerHorizontal = "true" Android: Layout_marginBottom = "4ldp "Android: Text =" @ String / Festival "/>  

Czech both & lt; / RelativeLayout & gt; . I hope to help.

Paul.


No comments:

Post a Comment