Google Maps not running in mobile
I want to implement google maps in my application. I did the procedure for implementing Google Maps in application such as getting API key and run in Google API emulator etc. It's running fine in Google API Emulator.
Now I want to implement this Google Maps in my application which is in Android2.1. I am not able to do. If I run this Google Maps application in Android mobile which is in android2.1 it's showing error.
Now I want to know whether it is possible to run Google Maps in Android2.1? If so how?
Here I am posting error which displays in logcat while running my Google Maps in Android2.1
05-20 11:35:45.488: ERROR/AndroidRuntime(3644): Uncaught handler: thread main exiting due to uncaught exception
05-20 11:35:45.498: ERROR/AndroidRuntime(3644): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.android.google.apis/com.example.android.apis.view.MapViewDemo}: android.view.InflateException: Binary XML file line #24: Error inflating class com.google.android.maps.MapView
05-20 11:35:45.498: ERROR/AndroidRuntime(3644): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2496)
05-20 11:35:45.498: ERROR/AndroidRuntime(3644): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
05-20 11:35:45.498: ERROR/AndroidRuntime(3644): at android.app.ActivityThread.access$2200(ActivityThread.java:119)
05-20 11:35:45.498: ERROR/AndroidRuntime(3644): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
05-20 11:35:45.498: ERROR/AndroidRuntime(3644): at android.os.Handler.dispatchMessage(Handler.java:99)
05-20 11:35:45.498: ERROR/AndroidRuntime(3644): at android.os.Looper.loop(Looper.java:123)
05-20 11:35:45.498: ERROR/AndroidRuntime(3644): at android.app.ActivityThread.main(ActivityThread.java:4363)
05-20 11:35:45.498: ERROR/AndroidRuntime(3644): at java.lang.reflect.Method.invokeNative(Native Method)
05-20 11:35:45.498: ERROR/AndroidRuntime(3644): at java.lang.reflect.Method.invoke(Method.java:521)
05-20 11:35:45.498: ERROR/AndroidRuntime(3644): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
05-20 11:35:45.498: ERROR/AndroidRuntime(3644): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
05-20 11:35:45.498: ERROR/AndroidRuntime(3644): at dalvik.system.NativeStart.main(Native Method)
05-20 11:35:45.498: ERROR/AndroidRuntime(3644): Caused by:开发者_如何学运维 android.view.InflateException: Binary XML file line #24: Error inflating class com.google.android.maps.MapView
05-20 11:35:45.498: ERROR/AndroidRuntime(3644): at android.view.LayoutInflater.createView(LayoutInflater.java:513)
05-20 11:35:45.498: ERROR/AndroidRuntime(3644): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:565)
05-20 11:35:45.498: ERROR/AndroidRuntime(3644): at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
05-20 11:35:45.498: ERROR/AndroidRuntime(3644): at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
05-20 11:35:45.498: ERROR/AndroidRuntime(3644): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
05-20 11:35:45.498: ERROR/AndroidRuntime(3644): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
05-20 11:35:45.498: ERROR/AndroidRuntime(3644): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
05-20 11:35:45.498: ERROR/AndroidRuntime(3644): at android.app.Activity.setContentView(Activity.java:1622)
05-20 11:35:45.498: ERROR/AndroidRuntime(3644): at com.example.android.apis.view.MapViewDemo.onCreate(MapViewDemo.java:50)
05-20 11:35:45.498: ERROR/AndroidRuntime(3644): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
05-20 11:35:45.498: ERROR/AndroidRuntime(3644): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459)
05-20 11:35:45.498: ERROR/AndroidRuntime(3644): ... 11 more
05-20 11:35:45.498: ERROR/AndroidRuntime(3644): Caused by: java.lang.reflect.InvocationTargetException
05-20 11:35:45.498: ERROR/AndroidRuntime(3644): at com.google.android.maps.MapView.<init>(MapView.java:238)
05-20 11:35:45.498: ERROR/AndroidRuntime(3644): at java.lang.reflect.Constructor.constructNative(Native Method)
05-20 11:35:45.498: ERROR/AndroidRuntime(3644): at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
05-20 11:35:45.498: ERROR/AndroidRuntime(3644): at android.view.LayoutInflater.createView(LayoutInflater.java:500)
05-20 11:35:45.498: ERROR/AndroidRuntime(3644): ... 21 more
05-20 11:35:45.498: ERROR/AndroidRuntime(3644): Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x1080215
05-20 11:35:45.498: ERROR/AndroidRuntime(3644): at android.content.res.Resources.getValue(Resources.java:891)
05-20 11:35:45.498: ERROR/AndroidRuntime(3644): at android.content.res.Resources.getDrawable(Resources.java:579)
05-20 11:35:45.498: ERROR/AndroidRuntime(3644): at com.google.android.maps.MapView.<init>(MapView.java:286)
05-20 11:35:45.498: ERROR/AndroidRuntime(3644): at com.google.android.maps.MapView.<init>(MapView.java:255)
05-20 11:35:45.498: ERROR/AndroidRuntime(3644): ... 25 more
Did you've added <uses-library android:name="com.google.android.maps" />
to manifest file?
精彩评论