I have changed my app so the user can have 2 different styles to the whole app. I have updated the Custom Tabs I created so they link to a Style which in turns (depending on the selected style) links to a Selector xml in drawable (ie what to show for selected or unselected).
Running this gives me the following Errors
01-09 10:46:28.701: E/AndroidRuntime(375): FATAL EXCEPTION: main
01-09 10:46:28.701: E/AndroidRuntime(375): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.myappname/com.myappname.RoundSelect}: android.view.InflateException: Binary XML file line #11: Error inflating class <unknown>
01-09 10:46:28.701: E/AndroidRuntime(375): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
01-09 10:46:28.701: E/AndroidRuntime(375): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
01-09 10:46:28.701: E/AndroidRuntime(375): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
01-09 10:46:28.701: E/AndroidRuntime(375): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
01-09 10:46:28.701: E/AndroidRuntime(375): at android.os.Handler.dispatchMessage(Handler.java:99)
01-09 10:46:28.701: E/AndroidRuntime(375): at android.os.Looper.loop(Looper.java:123)
01-09 10:46:28.701: E/AndroidRuntime(375): at android.app.ActivityThread.main(ActivityThread.java:3683)
01-09 10:46:28.701: E/AndroidRuntime(375): at java.lang.reflect.Method.invokeNative(Native Method)
01-09 10:46:28.701: E/AndroidRuntime(375): at java.lang.reflect.Method.invoke(Method.java:507)
01-09 10:46:28.701: E/AndroidRuntime(375): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
01-09 10:46:28.701: E/AndroidRuntime(375): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
01-09 10:46:28.701: E/AndroidRuntime(375): at dalvik.system.NativeStart.main(Native Method)
01-09 10:46:28.701: E/AndroidRuntime(375): Caused by: android.view.InflateException: Binary XML file line #11: Error inflating class <unknown>
01-09 10:46:28.701: E/AndroidRuntime(375): at android.view.LayoutInflater.createView(LayoutInflater.java:518)
01-09 10:46:28.701: E/AndroidRuntime(375): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
01-09 10:46:28.701: E/AndroidRuntime(375): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:568)
01-09 10:46:28.701: E/AndroidRuntime(375): at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
01-09 10:46:28.701: E/AndroidRuntime(375): at android.view.LayoutInflater.inflate(LayoutInflater.java:408)
01-09 10:46:28.701: E/AndroidRuntime(375): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
01-09 10:46:28.701: E/AndroidRuntime(375): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
01-09 10:46:28.701: E/AndroidRuntime(375): at com.myappname.RoundSelect.createTabView(RoundSelect.java:234)
01-09 10:46:28.701: E/AndroidRuntime(375): at com.myappname.RoundSelect.setupTab(RoundSelect.java:223)
01-09 10:46:28.701: E/AndroidRuntime(375): at com.myappname.RoundSelect.setupCustomTabs(RoundSelect.java:215)
01-09 10:46:28.701: E/AndroidRuntime(375): at com.myappname.RoundSelect.onCreate(RoundSelect.java:90)
01-09 10:46:28.701: E/AndroidRuntime(375): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
01-09 10:46:28.701: E/AndroidRuntime(375): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
01-09 10:46:28.701: E/AndroidRuntime(375): ... 11 more
01-09 10:46:28.701: E/AndroidRuntime(375): Caused by: java.lang.reflect.InvocationTargetException
01-09 10:46:28.701: E/AndroidRuntime(375): at java.lang.reflect.Constructor.constructNative(Native Method)
01-09 10:46:28.701: E/AndroidRuntime(375): at java.lang.reflect.Constructor.newInstance(Constructor.java:415)
01-09 10:46:28.701: E/AndroidRuntime(375): at android.view.LayoutInflater.createView(LayoutInflater.java:505)
01-09 10:46:28.701: E/AndroidRuntime(375): ... 23 more
01-09 10:46:28.701: E/AndroidRuntime(375): Caused by: android.content.res.Resources$NotFoundException: File res/drawable/custom_tab_text_selector_black.xml from drawable resource ID #0x7f020023
01-09 10:46:28.701: E/AndroidRuntime(375): at android.content.res.Resources.loadDrawable(Resources.java:1697)
01-09 10:46:28.701: E/AndroidRuntime(375): at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
01-09 10:46:28.701: E/AndroidRuntime(375): at android.view.View.<init>(View.java:1951)
01-09 10:46:28.701: E/AndroidRuntime(375): at android.widget.TextView.<init>(TextView.java:344)
01-09 10:46:28.701: E/AndroidRuntime(375): at android.widget.TextView.<init>(TextView.java:337)
01-09 10:46:28.701: E/AndroidRuntime(375): ... 26 more
01-09 10:46:28.701: E/AndroidRuntime(375): Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #7: <item> tag requires a 'drawable' attribute or child tag defining a drawable
01-09 10:46:28.701: E/AndroidRuntime(375): at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:167)
01-09 10:46:28.701: E/AndroidRuntime(375): at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:787)
01-09 10:46:28.701: E/AndroidRuntime(375): at android.graphics.drawable.Drawable.createFromXml(Drawable.java:728)
01-09 10:46:28.701: E/AndroidRuntime(375): at android.content.res.Resources.loadDrawable(Resources.java:1694)
01-09 10:46:28.701: E/AndroidRuntime(375): ... 30 more
Code for the Custombackground
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/tabsLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
style="?custom_tab_background_selector">
<TextView
android:id="#+id/customTabsText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="?custom_tab_text_selector">
</TextView>
</LinearLayout>
Method that is calling this
private static View createTabView(Context pContext, String pTabTitleText) {
View view = LayoutInflater.from(pContext).inflate(R.layout.custom_tabs_background, null);
TextView tv = (TextView) view.findViewById(R.id.customTabsText);
tv.setText(pTabTitleText);
return view;
}
The rest is just a xml Theme that points to a Selector XML which in turns points to some drawble xml files. Here is the Selector XML
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Active tab -->
<item
android:state_selected="true"
android:state_focused="false"
android:state_pressed="false"
android:drawable="#drawable/custom_tab_background_selected_black" />
<!-- Inactive tab -->
<item
android:state_selected="false"
android:state_focused="false"
android:state_pressed="false"
android:drawable="#drawable/custom_tab_background_unselected_black" />
<!-- Pressed tab -->
<item
android:state_pressed="true"
android:drawable="#android:color/transparent" />
<!-- Selected tab (using d-pad) -->
<item
android:state_focused="true"
android:state_selected="true"
android:state_pressed="false"
android:drawable="#android:color/transparent" />
</selector>
Any ideas on why I am getting this error would be great. Thanks for you time
It appears I tracked it down.
the background of the tab I was using android:background=.... but was also using the same for the colour of the text and it should have been android:textColour=....
all works now. Sorry for the confusion
Related
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
Here is my log output. I need your help determining where to begin to solve the issue:
If I execute the app in a device with version 4.4.2, no exception is thrown, but executing the app on a device with lower version, the app crashes..
12-05 11:34:50.716: E/AndroidRuntime(327): FATAL EXCEPTION: main
12-05 11:34:50.716: E/AndroidRuntime(327): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.solinpromex.casajuventudtrescantos/com.solinpromex.casajuventudtrescantos.MainActivity}: android.view.InflateException: Binary XML file line #18: Error inflating class <unknown>
12-05 11:34:50.716: E/AndroidRuntime(327): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.os.Handler.dispatchMessage(Handler.java:99)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.os.Looper.loop(Looper.java:123)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.app.ActivityThread.main(ActivityThread.java:3683)
12-05 11:34:50.716: E/AndroidRuntime(327): at java.lang.reflect.Method.invokeNative(Native Method)
12-05 11:34:50.716: E/AndroidRuntime(327): at java.lang.reflect.Method.invoke(Method.java:507)
12-05 11:34:50.716: E/AndroidRuntime(327): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
12-05 11:34:50.716: E/AndroidRuntime(327): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
12-05 11:34:50.716: E/AndroidRuntime(327): at dalvik.system.NativeStart.main(Native Method)
12-05 11:34:50.716: E/AndroidRuntime(327): Caused by: android.view.InflateException: Binary XML file line #18: Error inflating class <unknown>
12-05 11:34:50.716: E/AndroidRuntime(327): at android.view.LayoutInflater.createView(LayoutInflater.java:518)
12-05 11:34:50.716: E/AndroidRuntime(327): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:568)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.view.LayoutInflater.inflate(LayoutInflater.java:408)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
12-05 11:34:50.716: E/AndroidRuntime(327): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:207)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.app.Activity.setContentView(Activity.java:1657)
12-05 11:34:50.716: E/AndroidRuntime(327): at com.solinpromex.casajuventudtrescantos.MainActivity.onCreate(MainActivity.java:28)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
12-05 11:34:50.716: E/AndroidRuntime(327): ... 11 more
12-05 11:34:50.716: E/AndroidRuntime(327): Caused by: java.lang.reflect.InvocationTargetException
12-05 11:34:50.716: E/AndroidRuntime(327): at java.lang.reflect.Constructor.constructNative(Native Method)
12-05 11:34:50.716: E/AndroidRuntime(327): at java.lang.reflect.Constructor.newInstance(Constructor.java:415)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.view.LayoutInflater.createView(LayoutInflater.java:505)
12-05 11:34:50.716: E/AndroidRuntime(327): ... 22 more
12-05 11:34:50.716: E/AndroidRuntime(327): Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget
12-05 11:34:50.716: E/AndroidRuntime(327): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:460)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:336)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:697)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.content.res.Resources.loadDrawable(Resources.java:1709)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.widget.ImageView.<init>(ImageView.java:118)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.widget.ImageView.<init>(ImageView.java:108)
12-05 11:34:50.716: E/AndroidRuntime(327): ... 25 more
12-05 11:34:50.726: W/ActivityManager(60): Force finishing
The reason is clear:
12-05 11:34:50.716: E/AndroidRuntime(327): Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget
Solution: try to use the drawable with smaller resolution.
You have run out of memory which caused a bunch of issues (cannot inflate the activity xml which causes the activity to not start since you get an exception in the onCreate method that is not handled)
12-05 11:34:50.716: E/AndroidRuntime(327): Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget
12-05 11:34:50.716: E/AndroidRuntime(327): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:460)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:336)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:697)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.content.res.Resources.loadDrawable(Resources.java:1709)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
to fix it try loading a smaller size bitmap for in your imageview for lesser devices (pre 4.4.2)
My reports provide me this error but I can't understand how is it possible?
java.lang.RuntimeException: Unable to start activity ComponentInfo{net.aviascanner.aviascanner/net.aviascanner.aviascanner.ui.activities.GetCitiesActivity}: android.view.InflateException: Binary XML file line #11: Error inflating class <unknown>
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2753)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2769)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3905)
at android.app.ActivityThread.access$2600(ActivityThread.java:129)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2121)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:4717)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #11: Error inflating class <unknown>
at android.view.LayoutInflater.createView(LayoutInflater.java:513)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
at com.actionbarsherlock.internal.ActionBarSherlockCompat.setContentView(ActionBarSherlockCompat.java:853)
at com.actionbarsherlock.app.SherlockFragmentActivity.setContentView(SherlockFragmentActivity.java:262)
at net.aviascanner.aviascanner.ui.activities.GetCitiesActivity.onCreate(GetCitiesActivity.java:115)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2717)
... 12 more
Caused by: java.lang.reflect.InvocationTargetException
at android.widget.EditText.<init>(EditText.java:51)
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
at android.view.LayoutInflater.createView(LayoutInflater.java:500)
... 25 more
Caused by: android.content.res.Resources$NotFoundException: File res/drawable/selector_edittext.xml from drawable resource ID #0x7f0200c4
at android.content.res.Resources.loadDrawable(Resources.java:1725)
at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
at android.view.View.<init>(View.java:1901)
at android.widget.TextView.<init>(TextView.java:440)
at android.widget.EditText.<init>(EditText.java:55)
... 29 more
Caused by: java.lang.NullPointerException
at android.graphics.drawable.DrawableContainer$DrawableContainerState.addChild(DrawableContainer.java:349)
at android.graphics.drawable.StateListDrawable$StateListState.addStateSet(StateListDrawable.java:265)
at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:173)
at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:796)
at android.graphics.drawable.Drawable.createFromXml(Drawable.java:737)
at android.content.res.Resources.loadDrawable(Resources.java:1722)
... 33 more
android.view.InflateException: Binary XML file line #11: Error inflating class <unknown>
at android.view.LayoutInflater.createView(LayoutInflater.java:513)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
at com.actionbarsherlock.internal.ActionBarSherlockCompat.setContentView(ActionBarSherlockCompat.java:853)
at com.actionbarsherlock.app.SherlockFragmentActivity.setContentView(SherlockFragmentActivity.java:262)
at net.aviascanner.aviascanner.ui.activities.GetCitiesActivity.onCreate(GetCitiesActivity.java:115)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2717)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2769)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3905)
at android.app.ActivityThread.access$2600(ActivityThread.java:129)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2121)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:4717)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.InvocationTargetException
at android.widget.EditText.<init>(EditText.java:51)
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
at android.view.LayoutInflater.createView(LayoutInflater.java:500)
... 25 more
Caused by: android.content.res.Resources$NotFoundException: File res/drawable/selector_edittext.xml from drawable resource ID #0x7f0200c4
at android.content.res.Resources.loadDrawable(Resources.java:1725)
at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
at android.view.View.<init>(View.java:1901)
at android.widget.TextView.<init>(TextView.java:440)
at android.widget.EditText.<init>(EditText.java:55)
... 29 more
Caused by: java.lang.NullPointerException
at android.graphics.drawable.DrawableContainer$DrawableContainerState.addChild(DrawableContainer.java:349)
at android.graphics.drawable.StateListDrawable$StateListState.addStateSet(StateListDrawable.java:265)
at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:173)
at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:796)
at android.graphics.drawable.Drawable.createFromXml(Drawable.java:737)
at android.content.res.Resources.loadDrawable(Resources.java:1722)
... 33 more
java.lang.reflect.InvocationTargetException
at android.widget.EditText.<init>(EditText.java:51)
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
at android.view.LayoutInflater.createView(LayoutInflater.java:500)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
at com.actionbarsherlock.internal.ActionBarSherlockCompat.setContentView(ActionBarSherlockCompat.java:853)
at com.actionbarsherlock.app.SherlockFragmentActivity.setContentView(SherlockFragmentActivity.java:262)
at net.aviascanner.aviascanner.ui.activities.GetCitiesActivity.onCreate(GetCitiesActivity.java:115)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2717)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2769)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3905)
at android.app.ActivityThread.access$2600(ActivityThread.java:129)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2121)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:4717)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.content.res.Resources$NotFoundException: File res/drawable/selector_edittext.xml from drawable resource ID #0x7f0200c4
at android.content.res.Resources.loadDrawable(Resources.java:1725)
at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
at android.view.View.<init>(View.java:1901)
at android.widget.TextView.<init>(TextView.java:440)
at android.widget.EditText.<init>(EditText.java:55)
... 29 more
Caused by: java.lang.NullPointerException
at android.graphics.drawable.DrawableContainer$DrawableContainerState.addChild(DrawableContainer.java:349)
at android.graphics.drawable.StateListDrawable$StateListState.addStateSet(StateListDrawable.java:265)
at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:173)
at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:796)
at android.graphics.drawable.Drawable.createFromXml(Drawable.java:737)
at android.content.res.Resources.loadDrawable(Resources.java:1722)
... 33 more
android.content.res.Resources$NotFoundException: File res/drawable/selector_edittext.xml from drawable resource ID #0x7f0200c4
at android.content.res.Resources.loadDrawable(Resources.java:1725)
at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
at android.view.View.<init>(View.java:1901)
at android.widget.TextView.<init>(TextView.java:440)
at android.widget.EditText.<init>(EditText.java:55)
at android.widget.EditText.<init>(EditText.java:51)
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
at android.view.LayoutInflater.createView(LayoutInflater.java:500)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
at com.actionbarsherlock.internal.ActionBarSherlockCompat.setContentView(ActionBarSherlockCompat.java:853)
at com.actionbarsherlock.app.SherlockFragmentActivity.setContentView(SherlockFragmentActivity.java:262)
at net.aviascanner.aviascanner.ui.activities.GetCitiesActivity.onCreate(GetCitiesActivity.java:115)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2717)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2769)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3905)
at android.app.ActivityThread.access$2600(ActivityThread.java:129)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2121)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:4717)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at android.graphics.drawable.DrawableContainer$DrawableContainerState.addChild(DrawableContainer.java:349)
at android.graphics.drawable.StateListDrawable$StateListState.addStateSet(StateListDrawable.java:265)
at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:173)
at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:796)
at android.graphics.drawable.Drawable.createFromXml(Drawable.java:737)
at android.content.res.Resources.loadDrawable(Resources.java:1722)
... 33 more
java.lang.NullPointerException
at android.graphics.drawable.DrawableContainer$DrawableContainerState.addChild(DrawableContainer.java:349)
at android.graphics.drawable.StateListDrawable$StateListState.addStateSet(StateListDrawable.java:265)
at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:173)
at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:796)
at android.graphics.drawable.Drawable.createFromXml(Drawable.java:737)
at android.content.res.Resources.loadDrawable(Resources.java:1722)
at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
at android.view.View.<init>(View.java:1901)
at android.widget.TextView.<init>(TextView.java:440)
at android.widget.EditText.<init>(EditText.java:55)
at android.widget.EditText.<init>(EditText.java:51)
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
at android.view.LayoutInflater.createView(LayoutInflater.java:500)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
at com.actionbarsherlock.internal.ActionBarSherlockCompat.setContentView(ActionBarSherlockCompat.java:853)
at com.actionbarsherlock.app.SherlockFragmentActivity.setContentView(SherlockFragmentActivity.java:262)
at net.aviascanner.aviascanner.ui.activities.GetCitiesActivity.onCreate(GetCitiesActivity.java:115)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2717)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2769)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3905)
at android.app.ActivityThread.access$2600(ActivityThread.java:129)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2121)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:4717)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
at dalvik.system.NativeStart.main(Native Method)
I have found this error in my application also. In my application I solved my problem by making the copies of the drawables in all the folders of the drawables i.e. drawable-ldpi, drawable-mdpi, drawable-hdpi, drawable-xhdpi. This works correctly in my application. Hope this will solve your problem if u have not kept the drawables into all the provided drawable folders.
I'm trying to parse an xml file and extract data from it to display in my android app.
The xml file is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<record>
<study id="1">
<topic>SAX Parser</topic>
<content>Learn how to parse XML using SAXParser</content>
<author>Pete Houston</author>
<date>02-Oct-2011</date>
</study>
The file is stored in res/raw folder. The android activity calls a function which tries to read the xml file and parses it to retrieve data,which is then stored into an object of type Study (defined by me). This object is then returned by the function.
The skeleton structure of my code is given below:
public class XmlParserActivity extends Activity {
Study study=null;
protected void onCreate(Bundle savedInstanceState) {
//...android code and some variable initializations
try{
study = parseXml(getResources().openRawResource(R.raw.record));
}catch(Exception e){
e.printStackTrace();
finish();
}
}
public Study parseXml(InputStream is){
//code for parsing the input stream
return study;
}
When I launch the app in an emulator it crashes and produces android.content.res.ResourcesNotFoundException. Is there something wrong with the way I am accessing the xml file? Or do I need to set some permissions in the AndroidManifest.xml file? I have searched this site and other sites but have not found a satisfactory solution to my problem. Any guidance will be deeply appreciated.
logcat messages:
01-09 15:49:55.801: I/Process(1152): Sending signal. PID: 1152 SIG: 9
01-09 15:50:04.174: E/Trace(1198): error opening trace file: No such file or directory(2)
01-09 15:50:04.992: W/ResourceType(1198): No package identifier when getting value for resource number 0x00000001
01-09 15:50:05.002: D/AndroidRuntime(1198): Shutting down VM
01-09 15:50:05.002: W/dalvikvm(1198): threadid=1: thread exiting with uncaught exception (group=0x40a13300)
01-09 15:50:05.012: E/AndroidRuntime(1198): FATAL EXCEPTION: main
01-09 15:50:05.012: E/AndroidRuntime(1198): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.androidxmlparser/com.example.androidxmlparser.XmlParserActivity}: android.content.res.Resources$NotFoundException: String resource ID #0x1
01-09 15:50:05.012: E/AndroidRuntime(1198): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)
01-09 15:50:05.012: E/AndroidRuntime(1198): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
01-09 15:50:05.012: E/AndroidRuntime(1198): at android.app.ActivityThread.access$600(ActivityThread.java:130)
01-09 15:50:05.012: E/AndroidRuntime(1198): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
01-09 15:50:05.012: E/AndroidRuntime(1198): at android.os.Handler.dispatchMessage(Handler.java:99)
01-09 15:50:05.012: E/AndroidRuntime(1198): at android.os.Looper.loop(Looper.java:137)
01-09 15:50:05.012: E/AndroidRuntime(1198): at android.app.ActivityThread.main(ActivityThread.java:4745)
01-09 15:50:05.012: E/AndroidRuntime(1198): at java.lang.reflect.Method.invokeNative(Native Method)
01-09 15:50:05.012: E/AndroidRuntime(1198): at java.lang.reflect.Method.invoke(Method.java:511)
01-09 15:50:05.012: E/AndroidRuntime(1198): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
01-09 15:50:05.012: E/AndroidRuntime(1198): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
01-09 15:50:05.012: E/AndroidRuntime(1198): at dalvik.system.NativeStart.main(Native Method)
01-09 15:50:05.012: E/AndroidRuntime(1198): Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x1
01-09 15:50:05.012: E/AndroidRuntime(1198): at android.content.res.Resources.getText(Resources.java:229)
01-09 15:50:05.012: E/AndroidRuntime(1198): at android.widget.TextView.setText(TextView.java:3620)
01-09 15:50:05.012: E/AndroidRuntime(1198): at com.example.androidxmlparser.XmlParserActivity.onCreate(XmlParserActivity.java:34)
01-09 15:50:05.012: E/AndroidRuntime(1198): at android.app.Activity.performCreate(Activity.java:5008)
01-09 15:50:05.012: E/AndroidRuntime(1198): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
01-09 15:50:05.012: E/AndroidRuntime(1198): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
01-09 15:50:05.012: E/AndroidRuntime(1198): ... 11 more
You're trying to access a string resource that cannot be found.
As Matt Taylor suggests, you should check line 34 of your activity, and find which string resource is wrong.
Further to fiddler's comment on your question, I've just seen what I think is the problem:
Your xml file just needs to contain:
<study id="1">
<topic>SAX Parser</topic>
<content>Learn how to parse XML using SAXParser</content>
<author>Pete Houston</author>
<date>02-Oct-2011</date>
</study>
And you access it using:
getResources().openRawResource(R.raw.<xml file name (without.xml)>);
For example, if it was called xmldata.xml you'd use R.raw.xmldata
I have the following layout:
<TextView
android:id = "#+id/HRNoninTextBox"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/exitbtn"
android:text="Heart Rate"
android:textSize = "20sp"/>
<EditText
android:id="#+id/labelNoninHeartRate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="00"
android:layout_alignParentRight="true">
</EditText>
from the code i refer to these views, form my activity, in this way:
TextView tvHr= (TextView)findViewById(R.id.HRNoninTextBox);
EditText etHr = (EditText)findViewById(R.id.labelNoninHeartRate);
the first one does not produce any error, while the second statement produce the following error:
01-09 13:24:57.599: W/dalvikvm(28816): threadid=1: thread exiting with uncaught exception (group=0x4001e578)
01-09 13:24:57.619: E/AndroidRuntime(28816): FATAL EXCEPTION: main
01-09 13:24:57.619: E/AndroidRuntime(28816): java.lang.RuntimeException: Unable to start activity ComponentInfo{aid.assistant233/aid.assistant233.AidAssistant233Activity}: java.lang.ClassCastException: android.widget.TextView
01-09 13:24:57.619: E/AndroidRuntime(28816): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1651)
01-09 13:24:57.619: E/AndroidRuntime(28816): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
01-09 13:24:57.619: E/AndroidRuntime(28816): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
01-09 13:24:57.619: E/AndroidRuntime(28816): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
01-09 13:24:57.619: E/AndroidRuntime(28816): at android.os.Handler.dispatchMessage(Handler.java:99)
01-09 13:24:57.619: E/AndroidRuntime(28816): at android.os.Looper.loop(Looper.java:130)
01-09 13:24:57.619: E/AndroidRuntime(28816): at android.app.ActivityThread.main(ActivityThread.java:3691)
01-09 13:24:57.619: E/AndroidRuntime(28816): at java.lang.reflect.Method.invokeNative(Native Method)
01-09 13:24:57.619: E/AndroidRuntime(28816): at java.lang.reflect.Method.invoke(Method.java:507)
01-09 13:24:57.619: E/AndroidRuntime(28816): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:907)
01-09 13:24:57.619: E/AndroidRuntime(28816): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665)
01-09 13:24:57.619: E/AndroidRuntime(28816): at dalvik.system.NativeStart.main(Native Method)
01-09 13:24:57.619: E/AndroidRuntime(28816): Caused by: java.lang.ClassCastException: android.widget.TextView
01-09 13:24:57.619: E/AndroidRuntime(28816): at aid.assistant233.AidAssistant233Activity.onCreate(AidAssistant233Activity.java:331)
01-09 13:24:57.619: E/AndroidRuntime(28816): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
01-09 13:24:57.619: E/AndroidRuntime(28816): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1615)
01-09 13:24:57.619: E/AndroidRuntime(28816): ... 11 more
Where may be the problem?
Step1 : you can clean/build your project as everyone said . but If you are not getting your issue solve by clean/build then check my step2 for it.
Step:2:
I am not Sure But Can you please check your xml file once again?
this also could be happen if You've two elements with the same ID:
<TextView android:text="Hello Ahmedabad:"
android:id="#+id/txtahmedabad"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
</TextView>
<EditText android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:id="#+id/txtahmedabad"
android:text="">
</EditText>
if this is so then Give them different IDs -
it could picking the first one (the TextView) which obviously can't be cast to an EditText.
Hope it will some how help you.
After adding the following lines to the .xml file, the App crashs.
And how to get the map api key??
Any suggestions.
.xml code:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/mainlayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<com.google.android.maps.MapView
android:id="#+id/mapview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:apiKey="Your Maps API Key"
android:clickable="true" />
</RelativeLayout>
LogCat:
03-03 19:22:31.978: E/AndroidRuntime(871): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
03-03 19:22:31.978: E/AndroidRuntime(871): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
03-03 19:22:31.978: E/AndroidRuntime(871): at android.os.Handler.dispatchMessage(Handler.java:99)
03-03 19:22:31.978: E/AndroidRuntime(871): at android.os.Looper.loop(Looper.java:130)
03-03 19:22:31.978: E/AndroidRuntime(871): at android.app.ActivityThread.main(ActivityThread.java:3683)
03-03 19:22:31.978: E/AndroidRuntime(871): at java.lang.reflect.Method.invokeNative(Native Method)
03-03 19:22:31.978: E/AndroidRuntime(871): at java.lang.reflect.Method.invoke(Method.java:507)
03-03 19:22:31.978: E/AndroidRuntime(871): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
03-03 19:22:31.978: E/AndroidRuntime(871): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
03-03 19:22:31.978: E/AndroidRuntime(871): at dalvik.system.NativeStart.main(Native Method)
03-03 19:22:31.978: E/AndroidRuntime(871): Caused by: java.lang.IllegalArgumentException: provider==null
03-03 19:22:31.978: E/AndroidRuntime(871): at android.location.LocationManager.requestLocationUpdates(LocationManager.java:441)
03-03 19:22:31.978: E/AndroidRuntime(871): at com.androidbook.LocationsAPIDemo.LocationsAPIDemoActivity.onResume(LocationsAPIDemoActivity.java:54)
03-03 19:22:31.978: E/AndroidRuntime(871): at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1150)
03-03 19:22:31.978: E/AndroidRuntime(871): at android.app.Activity.performResume(Activity.java:3832)
03-03 19:22:31.978: E/AndroidRuntime(871): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2110)
03-03 19:22:31.978: E/AndroidRuntime(871): ... 12 more
03-03 20:16:50.698: E/AndroidRuntime(1012): FATAL EXCEPTION: main
03-03 20:16:50.698: E/AndroidRuntime(1012): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.androidbook.LocationsAPIDemo/com.androidbook.LocationsAPIDemo.LocationsAPIDemoActivity}: android.view.InflateException: Binary XML file line #32: Error inflating class com.google.android.maps.MapView
03-03 20:16:50.698: E/AndroidRuntime(1012): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
03-03 20:16:50.698: E/AndroidRuntime(1012): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
03-03 20:16:50.698: E/AndroidRuntime(1012): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
03-03 20:16:50.698: E/AndroidRuntime(1012): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
03-03 20:16:50.698: E/AndroidRuntime(1012): at android.os.Handler.dispatchMessage(Handler.java:99)
03-03 20:16:50.698: E/AndroidRuntime(1012): at android.os.Looper.loop(Looper.java:130)
03-03 20:16:50.698: E/AndroidRuntime(1012): at android.app.ActivityThread.main(ActivityThread.java:3683)
03-03 20:16:50.698: E/AndroidRuntime(1012): at java.lang.reflect.Method.invokeNative(Native Method)
03-03 20:16:50.698: E/AndroidRuntime(1012): at java.lang.reflect.Method.invoke(Method.java:507)
03-03 20:16:50.698: E/AndroidRuntime(1012): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
03-03 20:16:50.698: E/AndroidRuntime(1012): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
03-03 20:16:50.698: E/AndroidRuntime(1012): at dalvik.system.NativeStart.main(Native Method)
03-03 20:16:50.698: E/AndroidRuntime(1012): Caused by: android.view.InflateException: Binary XML file line #32: Error inflating class com.google.android.maps.MapView
03-03 20:16:50.698: E/AndroidRuntime(1012): at android.view.LayoutInflater.createView(LayoutInflater.java:518)
03-03 20:16:50.698: E/AndroidRuntime(1012): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:570)
03-03 20:16:50.698: E/AndroidRuntime(1012): at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
03-03 20:16:50.698: E/AndroidRuntime(1012): at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)
03-03 20:16:50.698: E/AndroidRuntime(1012): at android.view.LayoutInflater.inflate(LayoutInflater.java:408)
03-03 20:16:50.698: E/AndroidRuntime(1012): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
03-03 20:16:50.698: E/AndroidRuntime(1012): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
03-03 20:16:50.698: E/AndroidRuntime(1012): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:207)
03-03 20:16:50.698: E/AndroidRuntime(1012): at android.app.Activity.setContentView(Activity.java:1657)
03-03 20:16:50.698: E/AndroidRuntime(1012): at com.androidbook.LocationsAPIDemo.LocationsAPIDemoActivity.onCreate(LocationsAPIDemoActivity.java:27)
03-03 20:16:50.698: E/AndroidRuntime(1012): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
03-03 20:16:50.698: E/AndroidRuntime(1012): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
03-03 20:16:50.698: E/AndroidRuntime(1012): ... 11 more
03-03 20:16:50.698: E/AndroidRuntime(1012): Caused by: java.lang.reflect.InvocationTargetException
03-03 20:16:50.698: E/AndroidRuntime(1012): at java.lang.reflect.Constructor.constructNative(Native Method)
03-03 20:16:50.698: E/AndroidRuntime(1012): at java.lang.reflect.Constructor.newInstance(Constructor.java:415)
03-03 20:16:50.698: E/AndroidRuntime(1012): at android.view.LayoutInflater.createView(LayoutInflater.java:505)
03-03 20:16:50.698: E/AndroidRuntime(1012): ... 22 more
03-03 20:16:50.698: E/AndroidRuntime(1012): Caused by: java.lang.IllegalArgumentException: MapViews can only be created inside instances of MapActivity.
03-03 20:16:50.698: E/AndroidRuntime(1012): at com.google.android.maps.MapView.<init>(MapView.java:291)
03-03 20:16:50.698: E/AndroidRuntime(1012): at com.google.android.maps.MapView.<init>(MapView.java:264)
03-03 20:16:50.698: E/AndroidRuntime(1012): at com.google.android.maps.MapView.<init>(MapView.java:247)
03-03 20:16:50.698: E/AndroidRuntime(1012): ... 25 more
03-03 20:18:33.568: E/AndroidRuntime(1045): FATAL EXCEPTION: main
03-03 20:18:33.568: E/AndroidRuntime(1045): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.androidbook.LocationsAPIDemo/com.androidbook.LocationsAPIDemo.LocationsAPIDemoActivity}: android.view.InflateException: Binary XML file line #32: Error inflating class com.google.android.maps.MapView
03-03 20:18:33.568: E/AndroidRuntime(1045): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
03-03 20:18:33.568: E/AndroidRuntime(1045): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
03-03 20:18:33.568: E/AndroidRuntime(1045): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
03-03 20:18:33.568: E/AndroidRuntime(1045): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
03-03 20:18:33.568: E/AndroidRuntime(1045): at android.os.Handler.dispatchMessage(Handler.java:99)
03-03 20:18:33.568: E/AndroidRuntime(1045): at android.os.Looper.loop(Looper.java:130)
03-03 20:18:33.568: E/AndroidRuntime(1045): at android.app.ActivityThread.main(ActivityThread.java:3683)
03-03 20:18:33.568: E/AndroidRuntime(1045): at java.lang.reflect.Method.invokeNative(Native Method)
03-03 20:18:33.568: E/AndroidRuntime(1045): at java.lang.reflect.Method.invoke(Method.java:507)
03-03 20:18:33.568: E/AndroidRuntime(1045): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
03-03 20:18:33.568: E/AndroidRuntime(1045): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
03-03 20:18:33.568: E/AndroidRuntime(1045): at dalvik.system.NativeStart.main(Native Method)
03-03 20:18:33.568: E/AndroidRuntime(1045): Caused by: android.view.InflateException: Binary XML file line #32: Error inflating class com.google.android.maps.MapView
03-03 20:18:33.568: E/AndroidRuntime(1045): at android.view.LayoutInflater.createView(LayoutInflater.java:518)
03-03 20:18:33.568: E/AndroidRuntime(1045): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:570)
03-03 20:18:33.568: E/AndroidRuntime(1045): at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
03-03 20:18:33.568: E/AndroidRuntime(1045): at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)
03-03 20:18:33.568: E/AndroidRuntime(1045): at android.view.LayoutInflater.inflate(LayoutInflater.java:408)
03-03 20:18:33.568: E/AndroidRuntime(1045): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
03-03 20:18:33.568: E/AndroidRuntime(1045): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
03-03 20:18:33.568: E/AndroidRuntime(1045): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:207)
03-03 20:18:33.568: E/AndroidRuntime(1045): at android.app.Activity.setContentView(Activity.java:1657)
03-03 20:18:33.568: E/AndroidRuntime(1045): at com.androidbook.LocationsAPIDemo.LocationsAPIDemoActivity.onCreate(LocationsAPIDemoActivity.java:27)
03-03 20:18:33.568: E/AndroidRuntime(1045): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
03-03 20:18:33.568: E/AndroidRuntime(1045): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
03-03 20:18:33.568: E/AndroidRuntime(1045): ... 11 more
03-03 20:18:33.568: E/AndroidRuntime(1045): Caused by: java.lang.reflect.InvocationTargetException
03-03 20:18:33.568: E/AndroidRuntime(1045): at java.lang.reflect.Constructor.constructNative(Native Method)
03-03 20:18:33.568: E/AndroidRuntime(1045): at java.lang.reflect.Constructor.newInstance(Constructor.java:415)
03-03 20:18:33.568: E/AndroidRuntime(1045): at android.view.LayoutInflater.createView(LayoutInflater.java:505)
03-03 20:18:33.568: E/AndroidRuntime(1045): ... 22 more
03-03 20:18:33.568: E/AndroidRuntime(1045): Caused by: java.lang.IllegalArgumentException: MapViews can only be created inside instances of MapActivity.
03-03 20:18:33.568: E/AndroidRuntime(1045): at com.google.android.maps.MapView.<init>(MapView.java:291)
03-03 20:18:33.568: E/AndroidRuntime(1045): at com.google.android.maps.MapView.<init>(MapView.java:264)
03-03 20:18:33.568: E/AndroidRuntime(1045): at com.google.android.maps.MapView.<init>(MapView.java:247)
03-03 20:18:33.568: E/AndroidRuntime(1045): ... 25 more
03-03 20:29:14.449: E/AndroidRuntime(1079): FATAL EXCEPTION: main
03-03 20:29:14.449: E/AndroidRuntime(1079): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.androidbook.LocationsAPIDemo/com.androidbook.LocationsAPIDemo.LocationsAPIDemoActivity}: android.view.InflateException: Binary XML file line #32: Error inflating class com.google.android.maps.MapView
03-03 20:29:14.449: E/AndroidRuntime(1079): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
03-03 20:29:14.449: E/AndroidRuntime(1079): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
03-03 20:29:14.449: E/AndroidRuntime(1079): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
03-03 20:29:14.449: E/AndroidRuntime(1079): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
03-03 20:29:14.449: E/AndroidRuntime(1079): at android.os.Handler.dispatchMessage(Handler.java:99)
03-03 20:29:14.449: E/AndroidRuntime(1079): at android.os.Looper.loop(Looper.java:130)
03-03 20:29:14.449: E/AndroidRuntime(1079): at android.app.ActivityThread.main(ActivityThread.java:3683)
03-03 20:29:14.449: E/AndroidRuntime(1079): at java.lang.reflect.Method.invokeNative(Native Method)
03-03 20:29:14.449: E/AndroidRuntime(1079): at java.lang.reflect.Method.invoke(Method.java:507)
03-03 20:29:14.449: E/AndroidRuntime(1079): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
03-03 20:29:14.449: E/AndroidRuntime(1079): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
03-03 20:29:14.449: E/AndroidRuntime(1079): at dalvik.system.NativeStart.main(Native Method)
03-03 20:29:14.449: E/AndroidRuntime(1079): Caused by: android.view.InflateException: Binary XML file line #32: Error inflating class com.google.android.maps.MapView
03-03 20:29:14.449: E/AndroidRuntime(1079): at android.view.LayoutInflater.createView(LayoutInflater.java:518)
03-03 20:29:14.449: E/AndroidRuntime(1079): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:570)
03-03 20:29:14.449: E/AndroidRuntime(1079): at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
03-03 20:29:14.449: E/AndroidRuntime(1079): at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)
03-03 20:29:14.449: E/AndroidRuntime(1079): at android.view.LayoutInflater.inflate(LayoutInflater.java:408)
03-03 20:29:14.449: E/AndroidRuntime(1079): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
03-03 20:29:14.449: E/AndroidRuntime(1079): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
03-03 20:29:14.449: E/AndroidRuntime(1079): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:207)
03-03 20:29:14.449: E/AndroidRuntime(1079): at android.app.Activity.setContentView(Activity.java:1657)
03-03 20:29:14.449: E/AndroidRuntime(1079): at com.androidbook.LocationsAPIDemo.LocationsAPIDemoActivity.onCreate(LocationsAPIDemoActivity.java:27)
03-03 20:29:14.449: E/AndroidRuntime(1079): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
03-03 20:29:14.449: E/AndroidRuntime(1079): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
03-03 20:29:14.449: E/AndroidRuntime(1079): ... 11 more
03-03 20:29:14.449: E/AndroidRuntime(1079): Caused by: java.lang.reflect.InvocationTargetException
03-03 20:29:14.449: E/AndroidRuntime(1079): at java.lang.reflect.Constructor.constructNative(Native Method)
03-03 20:29:14.449: E/AndroidRuntime(1079): at java.lang.reflect.Constructor.newInstance(Constructor.java:415)
03-03 20:29:14.449: E/AndroidRuntime(1079): at android.view.LayoutInflater.createView(LayoutInflater.java:505)
03-03 20:29:14.449: E/AndroidRuntime(1079): ... 22 more
03-03 20:29:14.449: E/AndroidRuntime(1079): Caused by: java.lang.IllegalArgumentException: MapViews can only be created inside instances of MapActivity.
03-03 20:29:14.449: E/AndroidRuntime(1079): at com.google.android.maps.MapView.<init>(MapView.java:291)
03-03 20:29:14.449: E/AndroidRuntime(1079): at com.google.android.maps.MapView.<init>(MapView.java:264)
03-03 20:29:14.449: E/AndroidRuntime(1079): at com.google.android.maps.MapView.<init>(MapView.java:247)
03-03 20:29:14.449: E/AndroidRuntime(1079): ... 25 more
03-03 20:30:06.300: E/AndroidRuntime(1112): FATAL EXCEPTION: main
03-03 20:30:06.300: E/AndroidRuntime(1112): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.androidbook.LocationsAPIDemo/com.androidbook.LocationsAPIDemo.LocationsAPIDemoActivity}: android.view.InflateException: Binary XML file line #32: Error inflating class com.google.android.maps.MapView
03-03 20:30:06.300: E/AndroidRuntime(1112): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
03-03 20:30:06.300: E/AndroidRuntime(1112): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
03-03 20:30:06.300: E/AndroidRuntime(1112): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
03-03 20:30:06.300: E/AndroidRuntime(1112): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
03-03 20:30:06.300: E/AndroidRuntime(1112): at android.os.Handler.dispatchMessage(Handler.java:99)
03-03 20:30:06.300: E/AndroidRuntime(1112): at android.os.Looper.loop(Looper.java:130)
03-03 20:30:06.300: E/AndroidRuntime(1112): at android.app.ActivityThread.main(ActivityThread.java:3683)
03-03 20:30:06.300: E/AndroidRuntime(1112): at java.lang.reflect.Method.invokeNative(Native Method)
03-03 20:30:06.300: E/AndroidRuntime(1112): at java.lang.reflect.Method.invoke(Method.java:507)
03-03 20:30:06.300: E/AndroidRuntime(1112): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
03-03 20:30:06.300: E/AndroidRuntime(1112): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
03-03 20:30:06.300: E/AndroidRuntime(1112): at dalvik.system.NativeStart.main(Native Method)
03-03 20:30:06.300: E/AndroidRuntime(1112): Caused by: android.view.InflateException: Binary XML file line #32: Error inflating class com.google.android.maps.MapView
03-03 20:30:06.300: E/AndroidRuntime(1112): at android.view.LayoutInflater.createView(LayoutInflater.java:518)
03-03 20:30:06.300: E/AndroidRuntime(1112): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:570)
03-03 20:30:06.300: E/AndroidRuntime(1112): at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
03-03 20:30:06.300: E/AndroidRuntime(1112): at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)
03-03 20:30:06.300: E/AndroidRuntime(1112): at android.view.LayoutInflater.inflate(LayoutInflater.java:408)
03-03 20:30:06.300: E/AndroidRuntime(1112): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
03-03 20:30:06.300: E/AndroidRuntime(1112): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
03-03 20:30:06.300: E/AndroidRuntime(1112): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:207)
03-03 20:30:06.300: E/AndroidRuntime(1112): at android.app.Activity.setContentView(Activity.java:1657)
03-03 20:30:06.300: E/AndroidRuntime(1112): at com.androidbook.LocationsAPIDemo.LocationsAPIDemoActivity.onCreate(LocationsAPIDemoActivity.java:27)
03-03 20:30:06.300: E/AndroidRuntime(1112): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
03-03 20:30:06.300: E/AndroidRuntime(1112): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
03-03 20:30:06.300: E/AndroidRuntime(1112): ... 11 more
03-03 20:30:06.300: E/AndroidRuntime(1112): Caused by: java.lang.reflect.InvocationTargetException
03-03 20:30:06.300: E/AndroidRuntime(1112): at java.lang.reflect.Constructor.constructNative(Native Method)
03-03 20:30:06.300: E/AndroidRuntime(1112): at java.lang.reflect.Constructor.newInstance(Constructor.java:415)
03-03 20:30:06.300: E/AndroidRuntime(1112): at android.view.LayoutInflater.createView(LayoutInflater.java:505)
03-03 20:30:06.300: E/AndroidRuntime(1112): ... 22 more
03-03 20:30:06.300: E/AndroidRuntime(1112): Caused by: java.lang.IllegalArgumentException: MapViews can only be created inside instances of MapActivity.
03-03 20:30:06.300: E/AndroidRuntime(1112): at com.google.android.maps.MapView.<init>(MapView.java:291)
03-03 20:30:06.300: E/AndroidRuntime(1112): at com.google.android.maps.MapView.<init>(MapView.java:264)
03-03 20:30:06.300: E/AndroidRuntime(1112): at com.google.android.maps.MapView.<init>(MapView.java:247)
03-03 20:30:06.300: E/AndroidRuntime(1112): ... 25 more
03-03 21:05:44.128: E/AndroidRuntime(1148): FATAL EXCEPTION: main
03-03 21:05:44.128: E/AndroidRuntime(1148): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.androidbook.LocationsAPIDemo/com.androidbook.LocationsAPIDemo.LocationsAPIDemoActivity}: android.view.InflateException: Binary XML file line #32: Error inflating class com.google.android.maps.MapView
03-03 21:05:44.128: E/AndroidRuntime(1148): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
03-03 21:05:44.128: E/AndroidRuntime(1148): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
03-03 21:05:44.128: E/AndroidRuntime(1148): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
03-03 21:05:44.128: E/AndroidRuntime(1148): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
03-03 21:05:44.128: E/AndroidRuntime(1148): at android.os.Handler.dispatchMessage(Handler.java:99)
03-03 21:05:44.128: E/AndroidRuntime(1148): at android.os.Looper.loop(Looper.java:130)
03-03 21:05:44.128: E/AndroidRuntime(1148): at android.app.ActivityThread.main(ActivityThread.java:3683)
03-03 21:05:44.128: E/AndroidRuntime(1148): at java.lang.reflect.Method.invokeNative(Native Method)
03-03 21:05:44.128: E/AndroidRuntime(1148): at java.lang.reflect.Method.invoke(Method.java:507)
03-03 21:05:44.128: E/AndroidRuntime(1148): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
03-03 21:05:44.128: E/AndroidRuntime(1148): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
03-03 21:05:44.128: E/AndroidRuntime(1148): at dalvik.system.NativeStart.main(Native Method)
03-03 21:05:44.128: E/AndroidRuntime(1148): Caused by: android.view.InflateException: Binary XML file line #32: Error inflating class com.google.android.maps.MapView
03-03 21:05:44.128: E/AndroidRuntime(1148): at android.view.LayoutInflater.createView(LayoutInflater.java:518)
03-03 21:05:44.128: E/AndroidRuntime(1148): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:570)
03-03 21:05:44.128: E/AndroidRuntime(1148): at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
03-03 21:05:44.128: E/AndroidRuntime(1148): at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)
03-03 21:05:44.128: E/AndroidRuntime(1148): at android.view.LayoutInflater.inflate(LayoutInflater.java:408)
03-03 21:05:44.128: E/AndroidRuntime(1148): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
03-03 21:05:44.128: E/AndroidRuntime(1148): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
03-03 21:05:44.128: E/AndroidRuntime(1148): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:207)
03-03 21:05:44.128: E/AndroidRuntime(1148): at android.app.Activity.setContentView(Activity.java:1657)
03-03 21:05:44.128: E/AndroidRuntime(1148): at com.androidbook.LocationsAPIDemo.LocationsAPIDemoActivity.onCreate(LocationsAPIDemoActivity.java:27)
03-03 21:05:44.128: E/AndroidRuntime(1148): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
03-03 21:05:44.128: E/AndroidRuntime(1148): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
03-03 21:05:44.128: E/AndroidRuntime(1148): ... 11 more
03-03 21:05:44.128: E/AndroidRuntime(1148): Caused by: java.lang.reflect.InvocationTargetException
03-03 21:05:44.128: E/AndroidRuntime(1148): at java.lang.reflect.Constructor.constructNative(Native Method)
03-03 21:05:44.128: E/AndroidRuntime(1148): at java.lang.reflect.Constructor.newInstance(Constructor.java:415)
03-03 21:05:44.128: E/AndroidRuntime(1148): at android.view.LayoutInflater.createView(LayoutInflater.java:505)
03-03 21:05:44.128: E/AndroidRuntime(1148): ... 22 more
03-03 21:05:44.128: E/AndroidRuntime(1148): Caused by: java.lang.IllegalArgumentException: MapViews can only be created inside instances of MapActivity.
03-03 21:05:44.128: E/AndroidRuntime(1148): at com.google.android.maps.MapView.<init>(MapView.java:291)
03-03 21:05:44.128: E/AndroidRuntime(1148): at com.google.android.maps.MapView.<init>(MapView.java:264)
03-03 21:05:44.128: E/AndroidRuntime(1148): at com.google.android.maps.MapView.<init>(MapView.java:247)
03-03 21:05:44.128: E/AndroidRuntime(1148): ... 25 more
03-03 23:02:31.318: E/AndroidRuntime(1190): FATAL EXCEPTION: main
03-03 23:02:31.318: E/AndroidRuntime(1190): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.androidbook.LocationsAPIDemo/com.androidbook.LocationsAPIDemo.LocationsAPIDemoActivity}: android.view.InflateException: Binary XML file line #32: Error inflating class com.google.android.maps.MapView
03-03 23:02:31.318: E/AndroidRuntime(1190): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
03-03 23:02:31.318: E/AndroidRuntime(1190): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
03-03 23:02:31.318: E/AndroidRuntime(1190): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
03-03 23:02:31.318: E/AndroidRuntime(1190): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
03-03 23:02:31.318: E/AndroidRuntime(1190): at android.os.Handler.dispatchMessage(Handler.java:99)
03-03 23:02:31.318: E/AndroidRuntime(1190): at android.os.Looper.loop(Looper.java:130)
03-03 23:02:31.318: E/AndroidRuntime(1190): at android.app.ActivityThread.main(ActivityThread.java:3683)
03-03 23:02:31.318: E/AndroidRuntime(1190): at java.lang.reflect.Method.invokeNative(Native Method)
03-03 23:02:31.318: E/AndroidRuntime(1190): at java.lang.reflect.Method.invoke(Method.java:507)
03-03 23:02:31.318: E/AndroidRuntime(1190): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
03-03 23:02:31.318: E/AndroidRuntime(1190): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
03-03 23:02:31.318: E/AndroidRuntime(1190): at dalvik.system.NativeStart.main(Native Method)
03-03 23:02:31.318: E/AndroidRuntime(1190): Caused by: android.view.InflateException: Binary XML file line #32: Error inflating class com.google.android.maps.MapView
03-03 23:02:31.318: E/AndroidRuntime(1190): at android.view.LayoutInflater.createView(LayoutInflater.java:518)
03-03 23:02:31.318: E/AndroidRuntime(1190): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:570)
03-03 23:02:31.318: E/AndroidRuntime(1190): at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
03-03 23:02:31.318: E/AndroidRuntime(1190): at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)
03-03 23:02:31.318: E/AndroidRuntime(1190): at android.view.LayoutInflater.inflate(LayoutInflater.java:408)
03-03 23:02:31.318: E/AndroidRuntime(1190): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
03-03 23:02:31.318: E/AndroidRuntime(1190): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
03-03 23:02:31.318: E/AndroidRuntime(1190): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:207)
03-03 23:02:31.318: E/AndroidRuntime(1190): at android.app.Activity.setContentView(Activity.java:1657)
03-03 23:02:31.318: E/AndroidRuntime(1190): at com.androidbook.LocationsAPIDemo.LocationsAPIDemoActivity.onCreate(LocationsAPIDemoActivity.java:27)
03-03 23:02:31.318: E/AndroidRuntime(1190): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
03-03 23:02:31.318: E/AndroidRuntime(1190): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
03-03 23:02:31.318: E/AndroidRuntime(1190): ... 11 more
03-03 23:02:31.318: E/AndroidRuntime(1190): Caused by: java.lang.reflect.InvocationTargetException
03-03 23:02:31.318: E/AndroidRuntime(1190): at java.lang.reflect.Constructor.constructNative(Native Method)
03-03 23:02:31.318: E/AndroidRuntime(1190): at java.lang.reflect.Constructor.newInstance(Constructor.java:415)
03-03 23:02:31.318: E/AndroidRuntime(1190): at android.view.LayoutInflater.createView(LayoutInflater.java:505)
03-03 23:02:31.318: E/AndroidRuntime(1190): ... 22 more
03-03 23:02:31.318: E/AndroidRuntime(1190): Caused by: java.lang.IllegalArgumentException: MapViews can only be created inside instances of MapActivity.
03-03 23:02:31.318: E/AndroidRuntime(1190): at com.google.android.maps.MapView.<init>(MapView.java:291)
03-03 23:02:31.318: E/AndroidRuntime(1190): at com.google.android.maps.MapView.<init>(MapView.java:264)
03-03 23:02:31.318: E/AndroidRuntime(1190): at com.google.android.maps.MapView.<init>(MapView.java:247)
03-03 23:02:31.318: E/AndroidRuntime(1190): ... 25 more
You haven't posted the LogCat output, so it's hard to know why it is crashing, but it's probably because you've left the comment in there for the Maps key.
Here's a tutorial explaining how to get a (free) Google Maps API key, to insert into your app. Note that you generally need TWO. One is for your app when it's in debug mode (using the debug signing key). the other is for when you use a production version of the app (signed with a production signing key).
http://remwebdevelopment.com/dev/a35/Android-How-To-Set-Up-an-API-Key-for-Google-Maps.html