The file is: Activity_Display_Message.xml not _Method

On Monday, January 11, 2016 at 11:13:27 PM UTC-5, haidarde...@gmail.com 
wrote:
>
> Hello,
> I recently completed this app and I had the same problem of the app not 
> running. It appears the issue was within the Activity_Display_Method.xml. 
> Copy and paste this code and it should solve your issue:
>
> <?xml version="1.0" encoding="utf-8"?>
> <android.support.design.widget.CoordinatorLayout
>     xmlns:android="http://schemas.android.com/apk/res/android";
>     xmlns:app="http://schemas.android.com/apk/res-auto";
>     xmlns:tools="http://schemas.android.com/tools"; 
> android:layout_width="match_parent"
>     android:layout_height="match_parent" android:fitsSystemWindows="true"
>     tools:context="com.haidarcorp.myfirstapp.DisplayMessageActivity">
>
>     <android.support.design.widget.AppBarLayout 
> android:layout_height="wrap_content"
>         android:layout_width="match_parent" android:theme="@style/HydraTheme">
>
>         <android.support.v7.widget.Toolbar android:id="@+id/toolbar"
>             android:layout_width="match_parent" 
> android:layout_height="?attr/actionBarSize"
>             android:background="?attr/colorPrimary" 
> app:popupTheme="@style/HydraTheme" />
>
>     </android.support.design.widget.AppBarLayout>
>
>     <include layout="@layout/content_display_message" />
>
>
> </android.support.design.widget.CoordinatorLayout>
>
> If this doesn't work then hopefully somebody else knows how to solve it. 
> Good luck!
> Regards, Haidar
>
> On Monday, January 11, 2016 at 11:08:17 PM UTC-5, Ricardo Morales wrote:
>>
>> i followed every step of the Android Studio "My First App" tutorial but I 
>> can't get it working when I type my message and the second activity starts.
>>
>> Here is my logcat:
>>
>> 01-11 14:15:03.459 10362-10362/? D/dalvikvm: Late-enabling CheckJNI
>> 01-11 14:15:03.779 10362-10362/com.riotchi.ricki.myfirstapp W/dalvikvm: 
>> VFY: unable to find class referenced in signature 
>> (Landroid/view/SearchEvent;)
>> 01-11 14:15:03.779 10362-10362/com.riotchi.ricki.myfirstapp I/dalvikvm: 
>> Could not find method android.view.Window$Callback.onSearchRequested, 
>> referenced from method 
>> android.support.v7.view.WindowCallbackWrapper.onSearchRequested
>> 01-11 14:15:03.779 10362-10362/com.riotchi.ricki.myfirstapp W/dalvikvm: 
>> VFY: unable to resolve interface method 17964: 
>> Landroid/view/Window$Callback;.onSearchRequested 
>> (Landroid/view/SearchEvent;)Z
>> 01-11 14:15:03.779 10362-10362/com.riotchi.ricki.myfirstapp D/dalvikvm: 
>> VFY: replacing opcode 0x72 at 0x0002
>> 01-11 14:15:03.779 10362-10362/com.riotchi.ricki.myfirstapp I/dalvikvm: 
>> Could not find method 
>> android.view.Window$Callback.onWindowStartingActionMode, referenced from 
>> method 
>> android.support.v7.view.WindowCallbackWrapper.onWindowStartingActionMode
>> 01-11 14:15:03.779 10362-10362/com.riotchi.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-11 14:15:03.779 10362-10362/com.riotchi.ricki.myfirstapp D/dalvikvm: 
>> VFY: replacing opcode 0x72 at 0x0002
>> 01-11 14:15:03.989 10362-10362/com.riotchi.ricki.myfirstapp I/dalvikvm: 
>> Could not find method 
>> android.content.res.TypedArray.getChangingConfigurations, referenced from 
>> method android.support.v7.widget.TintTypedArray.getChangingConfigurations
>> 01-11 14:15:03.989 10362-10362/com.riotchi.ricki.myfirstapp W/dalvikvm: 
>> VFY: unable to resolve virtual method 422: 
>> Landroid/content/res/TypedArray;.getChangingConfigurations ()I
>> 01-11 14:15:03.989 10362-10362/com.riotchi.ricki.myfirstapp D/dalvikvm: 
>> VFY: replacing opcode 0x6e at 0x0002
>> 01-11 14:15:03.989 10362-10362/com.riotchi.ricki.myfirstapp I/dalvikvm: 
>> Could not find method android.content.res.TypedArray.getType, referenced 
>> from method android.support.v7.widget.TintTypedArray.getType
>> 01-11 14:15:03.989 10362-10362/com.riotchi.ricki.myfirstapp W/dalvikvm: 
>> VFY: unable to resolve virtual method 444: 
>> Landroid/content/res/TypedArray;.getType (I)I
>> 01-11 14:15:03.989 10362-10362/com.riotchi.ricki.myfirstapp D/dalvikvm: 
>> VFY: replacing opcode 0x6e at 0x0002
>> 01-11 14:15:04.009 10362-10362/com.riotchi.ricki.myfirstapp I/dalvikvm: 
>> Could not find method android.content.res.Resources.getDrawable, referenced 
>> from method android.support.v7.widget.ResourcesWrapper.getDrawable
>> 01-11 14:15:04.009 10362-10362/com.riotchi.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-11 14:15:04.009 10362-10362/com.riotchi.ricki.myfirstapp D/dalvikvm: 
>> VFY: replacing opcode 0x6e at 0x0002
>> 01-11 14:15:04.009 10362-10362/com.riotchi.ricki.myfirstapp I/dalvikvm: 
>> Could not find method android.content.res.Resources.getDrawableForDensity, 
>> referenced from method 
>> android.support.v7.widget.ResourcesWrapper.getDrawableForDensity
>> 01-11 14:15:04.009 10362-10362/com.riotchi.ricki.myfirstapp W/dalvikvm: 
>> VFY: unable to resolve virtual method 387: 
>> Landroid/content/res/Resources;.getDrawableForDensity 
>> (IILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
>> 01-11 14:15:04.009 10362-10362/com.riotchi.ricki.myfirstapp D/dalvikvm: 
>> VFY: replacing opcode 0x6e at 0x0002
>> 01-11 14:15:04.229 10362-10362/com.riotchi.ricki.myfirstapp 
>> D/OpenGLRenderer: Enabling debug mode 0
>> 01-11 14:15:10.179 10362-10362/com.riotchi.ricki.myfirstapp 
>> D/AndroidRuntime: Shutting down VM
>> 01-11 14:15:10.179 10362-10362/com.riotchi.ricki.myfirstapp W/dalvikvm: 
>> threadid=1: thread exiting with uncaught exception (group=0x4163fc08)
>> 01-11 14:15:10.189 10362-10362/com.riotchi.ricki.myfirstapp 
>> E/AndroidRuntime: FATAL EXCEPTION: main
>>                                                                              
>>  
>> Process: com.riotchi.ricki.myfirstapp, PID: 10362
>>                                                                              
>>  
>> java.lang.RuntimeException: Unable to start activity 
>> ComponentInfo{com.riotchi.ricki.myfirstapp/com.riotchi.ricki.myfirstapp.DisplayMessageActivity}:
>>  
>> java.lang.IllegalStateException: This Activity already has an action bar 
>> supplied by the window decor. Do not request 
>> Window.FEATURE_SUPPORT_ACTION_BAR and set windowActionBar to false in your 
>> theme to use a Toolbar instead.
>>                                                                              
>>      
>> at 
>> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2339)
>>                                                                              
>>      
>> at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2391)
>>                                                                              
>>      
>> at android.app.ActivityThread.access$900(ActivityThread.java:166)
>>                                                                              
>>      
>> at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1281)
>>                                                                              
>>      
>> at android.os.Handler.dispatchMessage(Handler.java:102)
>>                                                                              
>>      
>> at android.os.Looper.loop(Looper.java:146)
>>                                                                              
>>      
>> at android.app.ActivityThread.main(ActivityThread.java:5511)
>>                                                                              
>>      
>> at java.lang.reflect.Method.invokeNative(Native Method)
>>                                                                              
>>      
>> at java.lang.reflect.Method.invoke(Method.java:515)
>>                                                                              
>>      
>> at 
>> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
>>                                                                              
>>      
>> at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
>>                                                                              
>>      
>> at dalvik.system.NativeStart.main(Native Method)
>>                                                                              
>>   
>> Caused by: java.lang.IllegalStateException: This Activity already has an 
>> action bar supplied by the window decor. Do not request 
>> Window.FEATURE_SUPPORT_ACTION_BAR and set windowActionBar to false in your 
>> theme to use a Toolbar instead.
>>                                                                              
>>      
>> at 
>> android.support.v7.app.AppCompatDelegateImplV7.setSupportActionBar(AppCompatDelegateImplV7.java:198)
>>                                                                              
>>      
>> at 
>> android.support.v7.app.AppCompatActivity.setSupportActionBar(AppCompatActivity.java:99)
>>                                                                              
>>      
>> at 
>> com.riotchi.ricki.myfirstapp.DisplayMessageActivity.onCreate(DisplayMessageActivity.java:22)
>>                                                                              
>>      
>> at android.app.Activity.performCreate(Activity.java:5322)
>>                                                                              
>>      
>> at 
>> android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
>>                                                                              
>>      
>> at 
>> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2303)
>>                                                                              
>>      
>> at 
>> android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2391) 
>>                                                                              
>>      
>> at android.app.ActivityThread.access$900(ActivityThread.java:166) 
>>                                                                              
>>      
>> at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1281) 
>>                                                                              
>>      
>> at android.os.Handler.dispatchMessage(Handler.java:102) 
>>                                                                              
>>      
>> at android.os.Looper.loop(Looper.java:146) 
>>                                                                              
>>      
>> at android.app.ActivityThread.main(ActivityThread.java:5511) 
>>                                                                              
>>      
>> at java.lang.reflect.Method.invokeNative(Native Method) 
>>                                                                              
>>      
>> at java.lang.reflect.Method.invoke(Method.java:515) 
>>                                                                              
>>      
>> at 
>> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
>>  
>>
>>                                                                              
>>      
>> at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099) 
>>                                                                              
>>      
>> at dalvik.system.NativeStart.main(Native Method) 
>> 01-11 14:15:12.239 10362-10362/com.riotchi.ricki.myfirstapp I/Process: 
>> Sending signal. PID: 10362 SIG: 9
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/923d485c-c21b-4fc3-9595-2c9033477adf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to