I am currently using online resources. I've done some research but hardly found anything similar.
The problem is that during the first example, I ran the application right after creating it in Eclipse (no changes on my end). The only changes made were to the target SDK which had to be set to the latest Android version.
So when I run the application, the layout looks a bit raw, the text is not centered and the icon is not shown in the header label. I am also unable to see the application in the Main_Activity Graphical Layout.
The created app is called Silent Mode Toggle, I will update whatever necessary code when needed. I could not include the application output...
The label should have been preceded by the application logo or an image, and the "Hello World!" text should have appeared on the center of the screen.
Layout XML File:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" tools:context="com.dummies.android.silentmodetoggle.MainActivity" > <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/hello_world" /> </RelativeLayout>
P.S. I cannot include the screenshot due to my new profile here on SO.
- Below is the text generated in LogCat (application launches in AVD),
hope this helps:
- 09-17 18:33:04.941: E/Trace(676): error opening trace file: No such file or directory (2)
- 09-17 18:33:05.541: W/dalvikvm(676): VFY: unable to find class
referenced in signature (Landroid/view/SearchEvent;) - 09-17 18:33:05.541: I/dalvikvm(676): Could not find method
android.view.Window$Callback.onSearchRequested, referenced from
method
android.support.v7.internal.view.WindowCallbackWrapper.onSearchRequested - 09-17 18:33:05.541: W/dalvikvm(676): VFY: unable to resolve
interface method 14052:
Landroid/view/Window$Callback;.onSearchRequested
(Landroid/view/SearchEvent;)Z - 09-17 18:33:05.541: D/dalvikvm(676): VFY: replacing opcode 0x72 at
0x0002 - 09-17 18:33:05.541: I/dalvikvm(676): Could not find method
android.view.Window$Callback.onWindowStartingActionMode, referenced from method android.support.v7.internal.view.WindowCallbackWrapper.onWindowStartingActionMode - 09-17 18:33:05.551: W/dalvikvm(676): VFY: unable to resolve
interface method 14056:
Landroid/view/Window$Callback;.onWindowStartingActionMode
(Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode; - 09-17 18:33:05.551: D/dalvikvm(676): VFY: replacing opcode 0x72 at
0x0002 - 09-17 18:33:05.761: I/dalvikvm(676): Could not find method
android.view.ViewGroup.onRtlPropertiesChanged, referenced from method android.support.v7.widget.Toolbar.onRtlPropertiesChanged - 09-17 18:33:05.771: W/dalvikvm(676): VFY: unable to resolve virtual method 13953: Landroid/view/ViewGroup;.onRtlPropertiesChanged (I)V
- 09-17 18:33:05.771: D/dalvikvm(676): VFY: replacing opcode 0x6f at 0x0007
- 09-17 18:33:05.801: I/dalvikvm(676): Could not find method
android.content.res.TypedArray.getChangingConfigurations, referenced from method
android.support.v7.internal.widget.TintTypedArray.getChangingConfigurations - 09-17 18:33:05.801: W/dalvikvm(676): VFY: unable to resolve virtual
method 401:
Landroid/content/res/TypedArray;.getChangingConfigurations ()I - 09-17 18:33:05.801: D/dalvikvm(676): VFY: replacing opcode 0x6e at 0x0002
- 09-17 18:33:05.801: I/dalvikvm(676): Could not find method
android.content.res.TypedArray.getType, referenced from method
android.support.v7.internal.widget.TintTypedArray.getType - 09-17 18:33:05.801: W/dalvikvm(676): VFY: unable to resolve virtual method 423: Landroid/content/res/TypedArray;.getType (I)I
- 09-17 18:33:05.801: D/dalvikvm(676): VFY: replacing opcode 0x6e at 0x0002
- 09-17 18:33:06.181: D/gralloc_goldfish(676): Emulator without GPU
emulation detected. - 09-17 18:33:06.241: D/dalvikvm(676): GC_CONCURRENT freed 200K, 4%
free 8211K/8519K, paused 18ms+8ms, total 163ms