Hello i am using the tabhost in my application it works fine in 4.0 and up but when i try to run it in 2.3.3 it returns me a null pointer exception and force closes the application
here is the code i am getting error in :
TextView t = new TextView(this) ;
t= (TextView) getTabWidget().getChildAt(i).findViewById(android.R.id.title);
t.setTextColor(Color. parseColor("#ffffff"));
if (i == 0) tabHost.getTabWidget().getChildAt(i).setBackgroundColor(Color.parseColor("#00aedb"));
else tabHost.getTabWidget().getChildAt(i).setBackgroundColor(Color.parseColor("#0d82df"));
this is my logcat output :
05-16 12:29:27.009: E/AndroidRuntime(534): FATAL EXCEPTION: main
05-16 12:29:27.009: E/AndroidRuntime(534): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.moneyminder/com.example.moneyminder.MainActivity}: java.lang.NullPointerException
05-16 12:29:27.009: E/AndroidRuntime(534): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
05-16 12:29:27.009: E/AndroidRuntime(534): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
05-16 12:29:27.009: E/AndroidRuntime(534): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
05-16 12:29:27.009: E/AndroidRuntime(534): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
05-16 12:29:27.009: E/AndroidRuntime(534): at android.os.Handler.dispatchMessage(Handler.java:99)
05-16 12:29:27.009: E/AndroidRuntime(534): at android.os.Looper.loop(Looper.java:123)
05-16 12:29:27.009: E/AndroidRuntime(534): at android.app.ActivityThread.main(ActivityThread.java:3683)
05-16 12:29:27.009: E/AndroidRuntime(534): at java.lang.reflect.Method.invokeNative(Native Method)
05-16 12:29:27.009: E/AndroidRuntime(534): at java.lang.reflect.Method.invoke(Method.java:507)
05-16 12:29:27.009: E/AndroidRuntime(534): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
05-16 12:29:27.009: E/AndroidRuntime(534): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
05-16 12:29:27.009: E/AndroidRuntime(534): at dalvik.system.NativeStart.main(Native Method)
05-16 12:29:27.009: E/AndroidRuntime(534): Caused by: java.lang.NullPointerException
05-16 12:29:27.009: E/AndroidRuntime(534): at com.example.moneyminder.MainActivity.onCreate(MainActivity.java:78)
05-16 12:29:27.009: E/AndroidRuntime(534): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
05-16 12:29:27.009: E/AndroidRuntime(534): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
05-16 12:29:27.009: E/AndroidRuntime(534): ... 11 more
Related
I'm trying to use the Scringo chat project in my own and I've encountered an error when merging the manifest files. I get this:
Description Resource Path Location Type
[/home/mihai/Dropbox/Freelancing/2014-03-10, Man App/workspace_with_adds/ManApp/AndroidManifest.xml:45, /home/mihai/Dropbox/Freelancing/2014-03-10, Man App/workspace_with_adds/Scringo/AndroidManifest.xml:53] Trying to merge incompatible /manifest/application/activity[#name=com.facebook.LoginActivity] element:
<activity
-- #android:name="com.facebook.LoginActivity"
-- #android:screenOrientation="portrait"
-- #android:windowSoftInputMode="adjustPan">
<activity
++ #android:configChanges="orientation|keyboardHidden|screenSize"
++ #android:name="com.facebook.LoginActivity">
++</activity>
[/home/mihai/Dropbox/Freelancing/2014-03-10, Man App/workspace_with_adds/ManApp/AndroidManifest.xml:64, /home/mihai/Dropbox/Freelancing/2014-03-10, Man App/workspace_with_adds/Scringo/AndroidManifest.xml:57] Trying to merge incompatible /manifest/application/meta-data[#name=com.facebook.sdk.ApplicationId] element:
<meta-data
#android:name="com.facebook.sdk.ApplicationId"
-- #android:value="#string/app_id">
<meta-data
#android:name="com.facebook.sdk.ApplicationId"
++ #android:value="#string/replace_this_facebook_app_id">
ManApp line 1 Android Manifest Merger Problem
I know I have two activites the same(the facebook one) and two metadatas the same, so my question is which one do I remove or how do I handle this?
I tried removing both from my main manifest and then from the Scringo manifest and I always get this error when trying to login using facebook:
05-16 09:14:57.902: E/AndroidRuntime(2588): FATAL EXCEPTION: main
05-16 09:14:57.902: E/AndroidRuntime(2588): Process: com.manapp, PID: 2588
05-16 09:14:57.902: E/AndroidRuntime(2588): java.lang.RuntimeException: Unable to resume activity {com.manapp/com.facebook.LoginActivity}: java.lang.IllegalArgumentException: Argument 'applicationId' cannot be null or empty
05-16 09:14:57.902: E/AndroidRuntime(2588): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2788)
05-16 09:14:57.902: E/AndroidRuntime(2588): at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2817)
05-16 09:14:57.902: E/AndroidRuntime(2588): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2250)
05-16 09:14:57.902: E/AndroidRuntime(2588): at android.app.ActivityThread.access$800(ActivityThread.java:135)
05-16 09:14:57.902: E/AndroidRuntime(2588): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
05-16 09:14:57.902: E/AndroidRuntime(2588): at android.os.Handler.dispatchMessage(Handler.java:102)
05-16 09:14:57.902: E/AndroidRuntime(2588): at android.os.Looper.loop(Looper.java:136)
05-16 09:14:57.902: E/AndroidRuntime(2588): at android.app.ActivityThread.main(ActivityThread.java:5017)
05-16 09:14:57.902: E/AndroidRuntime(2588): at java.lang.reflect.Method.invokeNative(Native Method)
05-16 09:14:57.902: E/AndroidRuntime(2588): at java.lang.reflect.Method.invoke(Method.java:515)
05-16 09:14:57.902: E/AndroidRuntime(2588): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
05-16 09:14:57.902: E/AndroidRuntime(2588): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
05-16 09:14:57.902: E/AndroidRuntime(2588): at dalvik.system.NativeStart.main(Native Method)
05-16 09:14:57.902: E/AndroidRuntime(2588): Caused by: java.lang.IllegalArgumentException: Argument 'applicationId' cannot be null or empty
05-16 09:14:57.902: E/AndroidRuntime(2588): at com.facebook.internal.Validate.notNullOrEmpty(Validate.java:67)
05-16 09:14:57.902: E/AndroidRuntime(2588): at com.facebook.widget.WebDialog$BuilderBase.<init>(WebDialog.java:447)
05-16 09:14:57.902: E/AndroidRuntime(2588): at com.facebook.widget.WebDialog$Builder.<init>(WebDialog.java:559)
05-16 09:14:57.902: E/AndroidRuntime(2588): at com.facebook.AuthorizationClient$AuthDialogBuilder.<init>(AuthorizationClient.java:1015)
05-16 09:14:57.902: E/AndroidRuntime(2588): at com.facebook.AuthorizationClient$WebViewAuthHandler.tryAuthorize(AuthorizationClient.java:632)
05-16 09:14:57.902: E/AndroidRuntime(2588): at com.facebook.AuthorizationClient.tryCurrentHandler(AuthorizationClient.java:268)
05-16 09:14:57.902: E/AndroidRuntime(2588): at com.facebook.AuthorizationClient.tryNextHandler(AuthorizationClient.java:234)
05-16 09:14:57.902: E/AndroidRuntime(2588): at com.facebook.AuthorizationClient.authorize(AuthorizationClient.java:157)
05-16 09:14:57.902: E/AndroidRuntime(2588): at com.facebook.AuthorizationClient.startOrContinueAuth(AuthorizationClient.java:138)
05-16 09:14:57.902: E/AndroidRuntime(2588): at com.facebook.LoginActivity.onResume(LoginActivity.java:117)
05-16 09:14:57.902: E/AndroidRuntime(2588): at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1192)
05-16 09:14:57.902: E/AndroidRuntime(2588): at android.app.Activity.performResume(Activity.java:5310)
05-16 09:14:57.902: E/AndroidRuntime(2588): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2778)
05-16 09:14:57.902: E/AndroidRuntime(2588): ... 12 more
I have an app id in the strings file of my project and one in the scringo strings project and I have changed the value to both to no use.
The only thing that always seems to work is the facebook image share I already had. Even stranger, if I go and share something and after that try to login, I don't get an error anymore, it just works fine.
Any ideas of what might be the problem and how to solve this?
I ran into the same issue today after I added the following to my project.properties file:
manifestmerger.enabled=true
I was able to resolve the issues by removing the conflicting lines from the Scringo AndroidManifest.xml file. In other words, if you remove the lines:
<activity
#android:configChanges="orientation|keyboardHidden|screenSize"
#android:name="com.facebook.LoginActivity" />
And,
<meta-data
#android:name="com.facebook.sdk.ApplicationId"
#android:value="#string/replace_this_facebook_app_id" />
From your Scringo AndroidManifest.xml the errors should go away. Do note that I added "/" to the end (closing tags) as that is how mine is listed; perhaps you have closing tags elsewhere. Also, I did have to remove some permissions that were duplicated in my Scringo AndroidManifest.xml as well.
I found the section about setting the manifestmerger to true on this page helpful: http://www.scringo.com/docs/buzztouch/android-integration/
In the method below, NasaDailyFragment is always null in the debugger. The method call NasaDailyFragment.onRefresh(); fails using because of this. I can't figure out why its null.
public class NasaAppActivity extends FragmentActivity {
//other methods
public void onRefreshClicked(View view){
Log.d("debug", "in run");
FragmentManager fragmentManager=getSupportFragmentManager();
NasaDailyImage NasaDailyFragment=(NasaDailyImage)fragmentManager.findFragmentById(R.id.fragment_iotd);
if(NasaDailyFragment!=null){
Log.d("debug", "fragment has been casted and is NOT null!!!");
}
NasaDailyFragment.onRefresh();//always crashes here because NasaDailyFragment is null, this is "line 40" of the code
}
}
Here's the xml for the fragment defined by R.id.fragment_iotd
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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" >
<fragment android:name="com.wajumbie.nasadailyimage.NasaDailyImage"
android:id="#+id/fragment_iotd"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
</LinearLayout>
The logcat output
07-19 11:21:25.916: D/debug(534): in run
07-19 11:21:25.916: D/AndroidRuntime(534): Shutting down VM
07-19 11:21:25.916: W/dalvikvm(534): threadid=1: thread exiting with uncaught exception (group=0x409c01f8)
07-19 11:21:25.936: E/AndroidRuntime(534): FATAL EXCEPTION: main
07-19 11:21:25.936: E/AndroidRuntime(534): java.lang.IllegalStateException: Could not execute method of the activity
07-19 11:21:25.936: E/AndroidRuntime(534): at android.view.View$1.onClick(View.java:3044)
07-19 11:21:25.936: E/AndroidRuntime(534): at android.view.View.performClick(View.java:3511)
07-19 11:21:25.936: E/AndroidRuntime(534): at android.view.View$PerformClick.run(View.java:14105)
07-19 11:21:25.936: E/AndroidRuntime(534): at android.os.Handler.handleCallback(Handler.java:605)
07-19 11:21:25.936: E/AndroidRuntime(534): at android.os.Handler.dispatchMessage(Handler.java:92)
07-19 11:21:25.936: E/AndroidRuntime(534): at android.os.Looper.loop(Looper.java:137)
07-19 11:21:25.936: E/AndroidRuntime(534): at android.app.ActivityThread.main(ActivityThread.java:4424)
07-19 11:21:25.936: E/AndroidRuntime(534): at java.lang.reflect.Method.invokeNative(Native Method)
07-19 11:21:25.936: E/AndroidRuntime(534): at java.lang.reflect.Method.invoke(Method.java:511)
07-19 11:21:25.936: E/AndroidRuntime(534): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
07-19 11:21:25.936: E/AndroidRuntime(534): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
07-19 11:21:25.936: E/AndroidRuntime(534): at dalvik.system.NativeStart.main(Native Method)
07-19 11:21:25.936: E/AndroidRuntime(534): Caused by: java.lang.reflect.InvocationTargetException
07-19 11:21:25.936: E/AndroidRuntime(534): at java.lang.reflect.Method.invokeNative(Native Method)
07-19 11:21:25.936: E/AndroidRuntime(534): at java.lang.reflect.Method.invoke(Method.java:511)
07-19 11:21:25.936: E/AndroidRuntime(534): at android.view.View$1.onClick(View.java:3039)
07-19 11:21:25.936: E/AndroidRuntime(534): ... 11 more
07-19 11:21:25.936: E/AndroidRuntime(534): Caused by: java.lang.NullPointerException
07-19 11:21:25.936: E/AndroidRuntime(534): at com.wajumbie.nasadailyimage.NasaAppActivity.onRefreshClicked(NasaAppActivity.java:40)
07-19 11:21:25.936: E/AndroidRuntime(534): ... 14 more
07-19 11:21:26.556: I/dalvikvm(534): threadid=3: reacting to signal 3
07-19 11:21:26.586: I/dalvikvm(534): Wrote stack traces to '/data/anr/traces.txt'
when i adding an animation xml file to my project(i was trying scale, rotate, set) and try to launch it in Android 2.1 virtual machine, it crashed with following messages in logcat
05-16 00:14:01.821: E/AndroidRuntime(898): Uncaught handler: thread main exiting due to uncaught exception
05-16 00:14:01.861: E/AndroidRuntime(898): java.lang.RuntimeException: Unable to start activity ComponentInfo{su.k_r.tasstelecom/su.k_r.tasstelecom.CategoriesActivity}: android.view.InflateException: Binary XML file line #31: Error inflating class com.actionbarsherlock.internal.widget.ActionBarView
05-16 00:14:01.861: E/AndroidRuntime(898): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2496)
05-16 00:14:01.861: E/AndroidRuntime(898): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
05-16 00:14:01.861: E/AndroidRuntime(898): at android.app.ActivityThread.access$2200(ActivityThread.java:119)
05-16 00:14:01.861: E/AndroidRuntime(898): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
05-16 00:14:01.861: E/AndroidRuntime(898): at android.os.Handler.dispatchMessage(Handler.java:99)
05-16 00:14:01.861: E/AndroidRuntime(898): at android.os.Looper.loop(Looper.java:123)
05-16 00:14:01.861: E/AndroidRuntime(898): at android.app.ActivityThread.main(ActivityThread.java:4363)
05-16 00:14:01.861: E/AndroidRuntime(898): at java.lang.reflect.Method.invokeNative(Native Method)
05-16 00:14:01.861: E/AndroidRuntime(898): at java.lang.reflect.Method.invoke(Method.java:521)
05-16 00:14:01.861: E/AndroidRuntime(898): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
05-16 00:14:01.861: E/AndroidRuntime(898): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
05-16 00:14:01.861: E/AndroidRuntime(898): at dalvik.system.NativeStart.main(Native Method)
05-16 00:14:01.861: E/AndroidRuntime(898): Caused by: android.view.InflateException: Binary XML file line #31: Error inflating class com.actionbarsherlock.internal.widget.ActionBarView
05-16 00:14:01.861: E/AndroidRuntime(898): at android.view.LayoutInflater.createView(LayoutInflater.java:513)
05-16 00:14:01.861: E/AndroidRuntime(898): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:565)
05-16 00:14:01.861: E/AndroidRuntime(898): at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
05-16 00:14:01.861: E/AndroidRuntime(898): at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
05-16 00:14:01.861: E/AndroidRuntime(898): at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
05-16 00:14:01.861: E/AndroidRuntime(898): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
05-16 00:14:01.861: E/AndroidRuntime(898): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
05-16 00:14:01.861: E/AndroidRuntime(898): at com.actionbarsherlock.internal.ActionBarSherlockCompat.generateLayout(ActionBarSherlockCompat.java:1042)
05-16 00:14:01.861: E/AndroidRuntime(898): at com.actionbarsherlock.internal.ActionBarSherlockCompat.installDecor(ActionBarSherlockCompat.java:912)
05-16 00:14:01.861: E/AndroidRuntime(898): at com.actionbarsherlock.internal.ActionBarSherlockCompat.setContentView(ActionBarSherlockCompat.java:846)
05-16 00:14:01.861: E/AndroidRuntime(898): at com.actionbarsherlock.app.SherlockListActivity.setContentView(SherlockListActivity.java:212)
05-16 00:14:01.861: E/AndroidRuntime(898): at android.app.ListActivity.ensureList(ListActivity.java:305)
05-16 00:14:01.861: E/AndroidRuntime(898): at android.app.ListActivity.getListView(ListActivity.java:290)
05-16 00:14:01.861: E/AndroidRuntime(898): at su.k_r.tasstelecom.CategoriesActivity.onCreate(CategoriesActivity.java:72)
05-16 00:14:01.861: E/AndroidRuntime(898): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
05-16 00:14:01.861: E/AndroidRuntime(898): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459)
05-16 00:14:01.861: E/AndroidRuntime(898): ... 11 more
05-16 00:14:01.861: E/AndroidRuntime(898): Caused by: java.lang.reflect.InvocationTargetException
05-16 00:14:01.861: E/AndroidRuntime(898): at com.actionbarsherlock.internal.widget.ActionBarView.<init>(ActionBarView.java:235)
05-16 00:14:01.861: E/AndroidRuntime(898): at java.lang.reflect.Constructor.constructNative(Native Method)
05-16 00:14:01.861: E/AndroidRuntime(898): at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
05-16 00:14:01.861: E/AndroidRuntime(898): at android.view.LayoutInflater.createView(LayoutInflater.java:500)
05-16 00:14:01.861: E/AndroidRuntime(898): ... 26 more
05-16 00:14:01.861: E/AndroidRuntime(898): Caused by: java.lang.NullPointerException
05-16 00:14:01.861: E/AndroidRuntime(898): at com.actionbarsherlock.internal.widget.ActionBarView$HomeView.setUp(ActionBarView.java:1302)
05-16 00:14:01.861: E/AndroidRuntime(898): ... 30 more
I don't even use animation in code.
Where i'm doing wrong?
In android 4.0 everything works great
Cleaning ABS project fix problem
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
I have some trouble testing my Android application which includes the google maps API. The ooficial API example worked just fine but if I copy the code into my own project it keeps saying: "The application has stopped unexpectedly". I looked up the key in the keystore several times and registered it with google. Even tried reinstalling the SDK. Does anybody know what the problem is?
Thanks in advance
05-16 14:31:11.142: ERROR/ActivityThread(662): Failed to find provider info for com.google.settings
05-16 14:31:11.150: ERROR/ActivityThread(662): Failed to find provider info for com.google.settings
05-16 14:31:12.598: ERROR/MediaPlayerService(542): Couldn't open fd for content://settings/system/notification_sound
05-16 14:31:12.624: ERROR/MediaPlayer(562): Unable to to create media player
05-16 14:31:05.098: ERROR/ActivityThread(608): Failed to find provider info for android.server.checkin
05-16 14:31:06.538: ERROR/ActivityThread(608): Failed to find provider info for android.server.checkin
05-16 14:31:06.645: ERROR/ActivityThread(608): Failed to find provider info for android.server.checkin
05-16 14:31:12.803: ERROR/AndroidRuntime(715): ERROR: thread attach failed
05-16 14:31:13.698: ERROR/ActivityThread(723): Failed to find provider info for com.google.settings
05-16 14:31:13.987: ERROR/AndroidRuntime(723): Uncaught handler: thread main exiting due to uncaught exception
Basically my code is:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
//connect to server
//get current map scope
//get media within map scope + a bit
//init and show map
setContentView(R.layout.main);
//add zoom controls
mapView = (MapView) findViewById(R.id.mapview);
mapView.setBuiltInZoomControls(true);
//add menu
}
Exceptions:
05-16 15:13:05.204: ERROR/AndroidRuntime(726): java.lang.RuntimeException: Unable to start activity ComponentInfo{org.diretto.client.smartphone.android/org.diretto.client.smartphone.android.AnDiretto}: android.view.InflateException: Binary XML file line #6: Error inflating class java.lang.reflect.Constructor
05-16 15:13:05.204: ERROR/AndroidRuntime(726): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2268)
05-16 15:13:05.204: ERROR/AndroidRuntime(726): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2284)
05-16 15:13:05.204: ERROR/AndroidRuntime(726): at android.app.ActivityThread.access$1800(ActivityThread.java:112)
05-16 15:13:05.204: ERROR/AndroidRuntime(726): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692)
05-16 15:13:05.204: ERROR/AndroidRuntime(726): at android.os.Handler.dispatchMessage(Handler.java:99)
05-16 15:13:05.204: ERROR/AndroidRuntime(726): at android.os.Looper.loop(Looper.java:123)
05-16 15:13:05.204: ERROR/AndroidRuntime(726): at android.app.ActivityThread.main(ActivityThread.java:3948)
05-16 15:13:05.204: ERROR/AndroidRuntime(726): at java.lang.reflect.Method.invokeNative(Native Method)
05-16 15:13:05.204: ERROR/AndroidRuntime(726): at java.lang.reflect.Method.invoke(Method.java:521)
05-16 15:13:05.204: ERROR/AndroidRuntime(726): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782)
05-16 15:13:05.204: ERROR/AndroidRuntime(726): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
05-16 15:13:05.204: ERROR/AndroidRuntime(726): at dalvik.system.NativeStart.main(Native Method)
05-16 15:13:05.204: ERROR/AndroidRuntime(726): Caused by: android.view.InflateException: Binary XML file line #6: Error inflating class java.lang.reflect.Constructor
05-16 15:13:05.204: ERROR/AndroidRuntime(726): at android.view.LayoutInflater.createView(LayoutInflater.java:512)
05-16 15:13:05.204: ERROR/AndroidRuntime(726): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:564)
05-16 15:13:05.204: ERROR/AndroidRuntime(726): at android.view.LayoutInflater.rInflate(LayoutInflater.java:617)
05-16 15:13:05.204: ERROR/AndroidRuntime(726): at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
05-16 15:13:05.204: ERROR/AndroidRuntime(726): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
05-16 15:13:05.204: ERROR/AndroidRuntime(726): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
05-16 15:13:05.204: ERROR/AndroidRuntime(726): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:309)
05-16 15:13:05.204: ERROR/AndroidRuntime(726): at android.app.Activity.setContentView(Activity.java:1626)
05-16 15:13:05.204: ERROR/AndroidRuntime(726): at org.diretto.client.smartphone.android.AnDiretto.onCreate(AnDiretto.java:39)
05-16 15:13:05.204: ERROR/AndroidRuntime(726): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
05-16 15:13:05.204: ERROR/AndroidRuntime(726): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2231)
05-16 15:13:05.204: ERROR/AndroidRuntime(726): ... 11 more
05-16 15:13:05.204: ERROR/AndroidRuntime(726): Caused by: java.lang.reflect.InvocationTargetException
05-16 15:13:05.204: ERROR/AndroidRuntime(726): at com.google.android.maps.MapView.(MapView.java:237)
05-16 15:13:05.204: ERROR/AndroidRuntime(726): at java.lang.reflect.Constructor.constructNative(Native Method)
05-16 15:13:05.204: ERROR/AndroidRuntime(726): at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
05-16 15:13:05.204: ERROR/AndroidRuntime(726): at android.view.LayoutInflater.createView(LayoutInflater.java:499)
05-16 15:13:05.204: ERROR/AndroidRuntime(726): ... 21 more
05-16 15:13:05.204: ERROR/AndroidRuntime(726): Caused by: java.lang.IllegalStateException: You are only allowed to have a single MapView in a MapActivity
05-16 15:13:05.204: ERROR/AndroidRuntime(726): at com.google.android.maps.MapActivity.setupMapView(MapActivity.java:180)
05-16 15:13:05.204: ERROR/AndroidRuntime(726): at com.google.android.maps.MapView.(MapView.java:279)
05-16 15:13:05.204: ERROR/AndroidRuntime(726): at com.google.android.maps.MapView.(MapView.java:254)
05-16 15:13:05.204: ERROR/AndroidRuntime(726): ... 25 more
XML file line 6 would be:
<com.google.android.maps.MapView android:id="#+id/mapview" ...
followed by other lines of XML-parameters
First, do not answer your own question unless you are truly providing an answer. You can edit your question to add new materials, such as your longer stack trace.
Your exception is:
Caused by: java.lang.IllegalStateException: You are only allowed to have a single MapView in a MapActivity
This is because you are only allowed to have a single MapView in a MapActivity, and apparently you have two or more.
I know you are well past this issue, but I had the same issue, here are my notes about the same problem and how I was able to fix it.
You are only allowed to have a single MapView in a MapActivity
Delete a view and recreate it