[android-developers] First app not working
So I tried doing the first app tutorial from the web, the one that sends text to one activity to another. But I think i really suck at this. Here is my logcat: 01-09 17:04:47.471 1633-1633/com.example.ricki.myfirstapp D/dalvikvm: Not late-enabling CheckJNI (already on) 01-09 17:04:47.481 1633-1633/com.example.ricki.myfirstapp E/Trace: error opening trace file: No such file or directory (2) 01-09 17:04:47.501 1633-1633/com.example.ricki.myfirstapp W/dalvikvm: VFY: unable to find class referenced in signature (Landroid/view/SearchEvent;) 01-09 17:04:47.501 1633-1633/com.example.ricki.myfirstapp I/dalvikvm: Could not find method android.view.Window$Callback.onSearchRequested, referenced from method android.support.v7.view.WindowCallbackWrapper.onSearchRequested 01-09 17:04:47.501 1633-1633/com.example.ricki.myfirstapp W/dalvikvm: VFY: unable to resolve interface method 17964: Landroid/view/Window$Callback;.onSearchRequested (Landroid/view/SearchEvent;)Z 01-09 17:04:47.501 1633-1633/com.example.ricki.myfirstapp D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002 01-09 17:04:47.501 1633-1633/com.example.ricki.myfirstapp I/dalvikvm: Could not find method android.view.Window$Callback.onWindowStartingActionMode, referenced from method android.support.v7.view.WindowCallbackWrapper.onWindowStartingActionMode 01-09 17:04:47.501 1633-1633/com.example.ricki.myfirstapp W/dalvikvm: VFY: unable to resolve interface method 17968: Landroid/view/Window$Callback;.onWindowStartingActionMode (Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode; 01-09 17:04:47.501 1633-1633/com.example.ricki.myfirstapp D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002 01-09 17:04:47.521 1633-1637/com.example.ricki.myfirstapp E/jdwp: Failed sending reply to debugger: Broken pipe 01-09 17:04:47.521 1633-1637/com.example.ricki.myfirstapp D/dalvikvm: Debugger has detached; object registry had 1 entries 01-09 17:04:47.541 1633-1633/com.example.ricki.myfirstapp I/dalvikvm: Could not find method android.view.ViewGroup.onRtlPropertiesChanged, referenced from method android.support.v7.widget.Toolbar.onRtlPropertiesChanged 01-09 17:04:47.541 1633-1633/com.example.ricki.myfirstapp W/dalvikvm: VFY: unable to resolve virtual method 17860: Landroid/view/ViewGroup;.onRtlPropertiesChanged (I)V 01-09 17:04:47.541 1633-1633/com.example.ricki.myfirstapp D/dalvikvm: VFY: replacing opcode 0x6f at 0x0007 01-09 17:04:47.541 1633-1633/com.example.ricki.myfirstapp I/dalvikvm: Could not find method android.content.res.TypedArray.getChangingConfigurations, referenced from method android.support.v7.widget.TintTypedArray.getChangingConfigurations 01-09 17:04:47.541 1633-1633/com.example.ricki.myfirstapp W/dalvikvm: VFY: unable to resolve virtual method 422: Landroid/content/res/TypedArray;.getChangingConfigurations ()I 01-09 17:04:47.541 1633-1633/com.example.ricki.myfirstapp D/dalvikvm: VFY: replacing opcode 0x6e at 0x0002 01-09 17:04:47.541 1633-1633/com.example.ricki.myfirstapp I/dalvikvm: Could not find method android.content.res.TypedArray.getType, referenced from method android.support.v7.widget.TintTypedArray.getType 01-09 17:04:47.541 1633-1633/com.example.ricki.myfirstapp W/dalvikvm: VFY: unable to resolve virtual method 444: Landroid/content/res/TypedArray;.getType (I)I 01-09 17:04:47.541 1633-1633/com.example.ricki.myfirstapp D/dalvikvm: VFY: replacing opcode 0x6e at 0x0002 01-09 17:04:47.551 1633-1633/com.example.ricki.myfirstapp I/dalvikvm: Could not find method android.widget.LinearLayout$LayoutParams., referenced from method android.support.design.widget.AppBarLayout$LayoutParams. 01-09 17:04:47.551 1633-1633/com.example.ricki.myfirstapp W/dalvikvm: VFY: unable to resolve direct method 18480: Landroid/widget/LinearLayout$LayoutParams;. (Landroid/widget/LinearLayout$LayoutParams;)V 01-09 17:04:47.551 1633-1633/com.example.ricki.myfirstapp D/dalvikvm: VFY: replacing opcode 0x70 at 0x 01-09 17:04:47.551 1633-1633/com.example.ricki.myfirstapp I/dalvikvm: Could not find method android.widget.LinearLayout$LayoutParams., referenced from method android.support.design.widget.AppBarLayout$LayoutParams. 01-09 17:04:47.551 1633-1633/com.example.ricki.myfirstapp W/dalvikvm: VFY: unable to resolve direct method 18480: Landroid/widget/LinearLayout$LayoutParams;. (Landroid/widget/LinearLayout$LayoutParams;)V 01-09 17:04:47.551 1633-1633/com.example.ricki.myfirstapp D/dalvikvm: VFY: replacing opcode 0x70 at 0x 01-09 17:04:47.551 1633-1633/com.example.ricki.myfirstapp I/dalvikvm: Could not find method android.content.res.Resources.getDrawable, referenced from method android.support.v7.widget.ResourcesWrapper.getDrawable 01-09 17:04:47.551 1633-1633/com.example.ricki.myfirstapp W/dalvikvm: VFY: unable to resolve virtual method 385: Landroid/content/res/Resources;.getDrawable (ILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable; 01-09 17:04:47.551 1633-1633/com.example.ricki.myfirstapp
Re: [android-developers] First app not working
I don't think you suck at this, I think you need to have a bit more patience and remember that there is a learning curve here. First thing you need to learn is probably how to read a stack trace like the one that appears at the bottom of your logcat. In this case it is telling you that you have a null pointer in your MyActivity.OnCreate at line 25 so look at that line of code and figure out why that is! On Jan 9, 2016 6:09 PM, "Ricardo Morales"wrote: > So I tried doing the first app tutorial from the web, the one that sends > text to one activity to another. > But I think i really suck at this. > > Here is my logcat: > > 01-09 17:04:47.471 1633-1633/com.example.ricki.myfirstapp D/dalvikvm: Not > late-enabling CheckJNI (already on) > 01-09 17:04:47.481 1633-1633/com.example.ricki.myfirstapp E/Trace: error > opening trace file: No such file or directory (2) > 01-09 17:04:47.501 1633-1633/com.example.ricki.myfirstapp W/dalvikvm: VFY: > unable to find class referenced in signature (Landroid/view/SearchEvent;) > 01-09 17:04:47.501 1633-1633/com.example.ricki.myfirstapp I/dalvikvm: > Could not find method android.view.Window$Callback.onSearchRequested, > referenced from method > android.support.v7.view.WindowCallbackWrapper.onSearchRequested > 01-09 17:04:47.501 1633-1633/com.example.ricki.myfirstapp W/dalvikvm: VFY: > unable to resolve interface method 17964: > Landroid/view/Window$Callback;.onSearchRequested > (Landroid/view/SearchEvent;)Z > 01-09 17:04:47.501 1633-1633/com.example.ricki.myfirstapp D/dalvikvm: VFY: > replacing opcode 0x72 at 0x0002 > 01-09 17:04:47.501 1633-1633/com.example.ricki.myfirstapp I/dalvikvm: > Could not find method > android.view.Window$Callback.onWindowStartingActionMode, referenced from > method > android.support.v7.view.WindowCallbackWrapper.onWindowStartingActionMode > 01-09 17:04:47.501 1633-1633/com.example.ricki.myfirstapp W/dalvikvm: VFY: > unable to resolve interface method 17968: > Landroid/view/Window$Callback;.onWindowStartingActionMode > (Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode; > 01-09 17:04:47.501 1633-1633/com.example.ricki.myfirstapp D/dalvikvm: VFY: > replacing opcode 0x72 at 0x0002 > 01-09 17:04:47.521 1633-1637/com.example.ricki.myfirstapp E/jdwp: Failed > sending reply to debugger: Broken pipe > 01-09 17:04:47.521 1633-1637/com.example.ricki.myfirstapp D/dalvikvm: > Debugger has detached; object registry had 1 entries > 01-09 17:04:47.541 1633-1633/com.example.ricki.myfirstapp I/dalvikvm: > Could not find method android.view.ViewGroup.onRtlPropertiesChanged, > referenced from method > android.support.v7.widget.Toolbar.onRtlPropertiesChanged > 01-09 17:04:47.541 1633-1633/com.example.ricki.myfirstapp W/dalvikvm: VFY: > unable to resolve virtual method 17860: > Landroid/view/ViewGroup;.onRtlPropertiesChanged (I)V > 01-09 17:04:47.541 1633-1633/com.example.ricki.myfirstapp D/dalvikvm: VFY: > replacing opcode 0x6f at 0x0007 > 01-09 17:04:47.541 1633-1633/com.example.ricki.myfirstapp I/dalvikvm: > Could not find method > android.content.res.TypedArray.getChangingConfigurations, referenced from > method android.support.v7.widget.TintTypedArray.getChangingConfigurations > 01-09 17:04:47.541 1633-1633/com.example.ricki.myfirstapp W/dalvikvm: VFY: > unable to resolve virtual method 422: > Landroid/content/res/TypedArray;.getChangingConfigurations ()I > 01-09 17:04:47.541 1633-1633/com.example.ricki.myfirstapp D/dalvikvm: VFY: > replacing opcode 0x6e at 0x0002 > 01-09 17:04:47.541 1633-1633/com.example.ricki.myfirstapp I/dalvikvm: > Could not find method android.content.res.TypedArray.getType, referenced > from method android.support.v7.widget.TintTypedArray.getType > 01-09 17:04:47.541 1633-1633/com.example.ricki.myfirstapp W/dalvikvm: VFY: > unable to resolve virtual method 444: > Landroid/content/res/TypedArray;.getType (I)I > 01-09 17:04:47.541 1633-1633/com.example.ricki.myfirstapp D/dalvikvm: VFY: > replacing opcode 0x6e at 0x0002 > 01-09 17:04:47.551 1633-1633/com.example.ricki.myfirstapp I/dalvikvm: > Could not find method android.widget.LinearLayout$LayoutParams., > referenced from method > android.support.design.widget.AppBarLayout$LayoutParams. > 01-09 17:04:47.551 1633-1633/com.example.ricki.myfirstapp W/dalvikvm: VFY: > unable to resolve direct method 18480: > Landroid/widget/LinearLayout$LayoutParams;. > (Landroid/widget/LinearLayout$LayoutParams;)V > 01-09 17:04:47.551 1633-1633/com.example.ricki.myfirstapp D/dalvikvm: VFY: > replacing opcode 0x70 at 0x > 01-09 17:04:47.551 1633-1633/com.example.ricki.myfirstapp I/dalvikvm: > Could not find method android.widget.LinearLayout$LayoutParams., > referenced from method > android.support.design.widget.AppBarLayout$LayoutParams. > 01-09 17:04:47.551 1633-1633/com.example.ricki.myfirstapp W/dalvikvm: VFY: > unable to resolve direct method 18480: > Landroid/widget/LinearLayout$LayoutParams;. > (Landroid/widget/LinearLayout$LayoutParams;)V > 01-09 17:04:47.551