我在Android上运行SupportMapFragment有问题(API 10)这是我从logcat获得的:
02-22 02:16:09.516 1132-1202/? E/ActivityManager﹕ heap conf. property name string trimmed: hs.com.lge.android.calendar.wid
02-22 03:50:54.214 15767-15767/? E/ActivityThread﹕ Service com.koushikdutta.rommanager.DownloadService has leaked IntentReceiver com.clockworkmod.billing.ClockworkModBillingClient$8@4054cb08 that was originally registered here. Are you missing a call to unregisterReceiver()?
android.app.IntentReceiverLeaked: Service com.koushikdutta.rommanager.DownloadService has leaked IntentReceiver com.clockworkmod.billing.ClockworkModBillingClient$8@4054cb08 that was originally registered here. Are you missing a call to unregisterReceiver()?
at android.app.LoadedApk$ReceiverDispatcher.<init>(LoadedApk.java:756)
at android.app.LoadedApk.getReceiverDispatcher(LoadedApk.java:551)
at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:817)
at android.app.ContextImpl.registerReceiver(ContextImpl.java:804)
at android.app.ContextImpl.registerReceiver(ContextImpl.java:798)
at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:318)
at com.clockworkmod.billing.ClockworkModBillingClient.checkPurchase(ClockworkModBillingClient.java:890)
at com.koushikdutta.rommanager.Helper.checkClockworkBilling(Helper.java:334)
at com.koushikdutta.rommanager.Helper.isPremium(Helper.java:359)
at com.koushikdutta.rommanager.DownloadService.checkForUpdates(DownloadService.java:624)
at com.koushikdutta.rommanager.DownloadService.onStartCommand(DownloadService.java:713)
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2039)
at android.app.ActivityThread.access$2800(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:994)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:861)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:619)
at dalvik.system.NativeStart.main(Native Method)
02-22 10:10:36.187 1132-1352/? E/ActivityManager﹕ heap conf. property name string trimmed: hs.com.google.android.apps.uplo
02-22 10:11:03.367 1132-1370/? E/ActivityManager﹕ heap conf. property name string trimmed: hs.com.lge.android.worldclock.w
02-22 10:17:27.607 1038-11211/? E/SuperExtractor﹕ File not supported
02-22 10:17:28.630 1038-1277/? E/SuperExtractor﹕ File not supported
02-22 10:17:36.090 1132-1261/? E/ResourceType﹕ Style contains key with bad entry: 0x0101039c
02-22 10:17:36.237 1132-4329/? E/ActivityManager﹕ heap conf. property name string trimmed: hs.com.lge.android.worldclock.w
02-22 10:17:36.387 1038-14442/? E/SuperExtractor﹕ File not supported
02-22 10:17:37.000 15486-15486/? E/ResourceType﹕ Style contains key with bad entry: 0x0101039c
02-22 10:17:37.657 15486-15486/? E/ResourceType﹕ Style contains key with bad entry: 0x0101039c
02-22 10:17:38.917 1038-14442/? E/SuperExtractor﹕ File not supported
02-22 10:17:40.590 15486-15486/? E/ResourceType﹕ Style contains key with bad entry: 0x01010336
02-22 10:17:40.590 15486-15486/? E/ResourceType﹕ Style contains key with bad entry: 0x01010338
02-22 10:17:40.590 15486-15486/? E/ResourceType﹕ Style contains key with bad entry: 0x0101033a
02-22 10:17:40.590 15486-15486/? E/ResourceType﹕ Style contains key with bad entry: 0x01010359
02-22 10:17:40.697 15486-15486/? E/ResourceType﹕ Style contains key with bad entry: 0x0101039c
02-22 10:17:41.527 1038-1038/? E/SuperExtractor﹕ File not supported
02-22 10:17:41.737 15486-15486/? E/ResourceType﹕ Style contains key with bad entry: 0x0101039c
02-22 10:17:42.130 15486-15486/? E/ResourceType﹕ Style contains key with bad entry: 0x01010336
02-22 10:17:42.130 15486-15486/? E/ResourceType﹕ Style contains key with bad entry: 0x01010338
02-22 10:17:42.130 15486-15486/? E/ResourceType﹕ Style contains key with bad entry: 0x0101033a
02-22 10:17:42.130 15486-15486/? E/ResourceType﹕ Style contains key with bad entry: 0x01010359
02-22 10:17:42.270 15486-15486/? E/ResourceType﹕ Style contains key with bad entry: 0x0101039c
02-22 10:17:42.687 1038-11210/? E/SuperExtractor﹕ File not supported
02-22 10:17:45.007 15486-15486/? E/ResourceType﹕ Style contains key with bad entry: 0x0101039c
02-22 10:17:45.177 15486-15486/? E/ResourceType﹕ Style contains key with bad entry: 0x0101039c
02-22 10:17:46.257 1038-1038/? E/SuperExtractor﹕ File not supported
02-22 10:17:47.727 1038-1277/? E/SuperExtractor﹕ File not supported
02-22 10:17:49.227 1038-11211/? E/SuperExtractor﹕ File not supported
02-22 10:17:54.600 1038-1277/? E/SuperExtractor﹕ File not supported
02-22 10:17:57.427 1038-1128/? E/SuperExtractor﹕ File not supported
02-22 10:17:57.450 1038-11210/? E/AudioPolicyManagerBase﹕ setStreamVolume() for output 1 stream 3, volume 0.000000, delay 0
02-22 10:17:57.450 1038-11210/? E/AudioPolicyManagerBase﹕ setStreamVolume() for output 1 stream 12, volume 0.000000, delay 0
02-22 10:17:57.500 1038-19084/? E/AudioPolicyManagerBase﹕ setStreamVolume() for output 1 stream 3, volume 0.100000, delay 500
02-22 10:17:57.500 1038-19084/? E/AudioPolicyManagerBase﹕ setStreamVolume() for output 1 stream 12, volume 0.100000, delay 500
02-22 10:17:58.587 1038-1128/? E/SuperExtractor﹕ File not supported
02-22 10:17:58.597 1038-1128/? E/AudioPolicyManagerBase﹕ setStreamVolume() for output 1 stream 3, volume 0.000000, delay 0
02-22 10:17:58.597 1038-1128/? E/AudioPolicyManagerBase﹕ setStreamVolume() for output 1 stream 12, volume 0.000000, delay 0
02-22 10:17:58.807 1038-19086/? E/AudioPolicyManagerBase﹕ setStreamVolume() for output 1 stream 3, volume 0.100000, delay 500
02-22 10:17:58.807 1038-19086/? E/AudioPolicyManagerBase﹕ setStreamVolume() for output 1 stream 12, volume 0.100000, delay 500
02-22 10:18:05.087 1038-11211/? E/SuperExtractor﹕ File not supported
02-22 10:18:35.120 1132-1370/? E/ActivityManager﹕ heap conf. property name string trimmed: hs.com.lge.android.worldclock.w
02-22 10:18:45.517 29533-29533/? E/wpa_supplicant﹕ WEXT: STOP when iface is UP
02-22 10:18:45.887 1132-1269/? E/ConnectivityService﹕ not failing over to mobile type 0 because Mobile Data Disabled
02-22 10:18:45.887 1132-1269/? E/ConnectivityService﹕ not failing over to mobile type 2 because Mobile Data Disabled
02-22 10:18:45.887 1132-1269/? E/ConnectivityService﹕ not failing over to mobile type 3 because Mobile Data Disabled
02-22 10:18:45.887 1132-1269/? E/ConnectivityService﹕ not failing over to mobile type 4 because Mobile Data Disabled
02-22 10:18:45.887 1132-1269/? E/ConnectivityService﹕ not failing over to mobile type 5 because Mobile Data Disabled
02-22 10:18:48.017 1132-16702/? E/ActivityManager﹕ heap conf. property name string trimmed: hs.com.google.android.apps.uplo
02-22 10:18:51.717 1331-1331/? E/SIM_STK﹕ Inititating Monitor
02-22 10:20:15.127 1331-1331/? E/SIM_STK﹕ SPN: BA-EronetPLMN: ERONET
02-22 10:20:15.127 1331-1331/? E/SIM_STK﹕ showspn: trueshowPlmn: false
02-22 10:20:15.127 1331-1331/? E/SIM_STK﹕ Before Posting Intent, country_sim = BA operator_Sim = Eronet
02-22 10:20:15.127 1331-1331/? E/SIM_STK﹕ ShowSpn = true Plmn = false
02-22 10:20:29.387 1132-1199/? E/Tethering﹕ active iface (usb0) reported as added, ignoring
02-22 10:22:21.417 1132-1199/? E/Tethering﹕ active iface (usb0) reported as added, ignoring
02-22 10:23:24.337 1331-1331/? E/SIM_STK﹕ SPN: BA-EronetPLMN: ERONET
02-22 10:23:24.337 1331-1331/? E/SIM_STK﹕ showspn: trueshowPlmn: false
02-22 10:23:24.337 1331-1331/? E/SIM_STK﹕ Before Posting Intent, country_sim = BA operator_Sim = Eronet
02-22 10:23:24.337 1331-1331/? E/SIM_STK﹕ ShowSpn = true Plmn = false
02-22 10:23:27.227 1132-1199/? E/Tethering﹕ active iface (usb0) reported as added, ignoring
02-22 10:23:51.739 1331-1331/? E/SIM_STK﹕ Inititating Monitor
02-22 10:24:35.767 1132-1199/? E/Tethering﹕ active iface (usb0) reported as added, ignoring
02-22 10:24:57.237 1132-1199/? E/Tethering﹕ active iface (usb0) reported as added, ignoring
02-22 10:26:27.237 1132-1199/? E/Tethering﹕ active iface (usb0) reported as added, ignoring
02-22 10:27:12.567 1132-1199/? E/Tethering﹕ active iface (usb0) reported as added, ignoring
02-22 10:27:57.237 1132-1199/? E/Tethering﹕ active iface (usb0) reported as added, ignoring
02-22 10:28:05.117 29533-29533/? E/wpa_supplicant﹕ ioctl[SIOCSIWSCAN]
02-22 10:28:07.317 1132-29539/? E/﹕ dhcp_do_request:: DHCP result prop_value is ok
02-22 10:28:07.317 1132-29539/? E/WifiStateTracker﹕ [dhcp handler] release sWiFiDhcpWakeLock
02-22 10:28:10.477 1132-1138/? E/ActivityManager﹕ heap conf. property name string trimmed: hs.com.lge.android.worldclock.w
02-22 10:28:10.707 5456-19771/? E/TalkProvider﹕ replaceContactWithContactId: contactId==0!!! dvasic1@gmail.com, acct=1
02-22 10:28:10.707 5456-19771/? E/TalkProvider﹕ insert presence failed for account=1 username=dvasic1@gmail.com client_type=2 status= cap=0 priority=0 mode=3
02-22 10:28:20.707 29533-29533/? E/wpa_supplicant﹕ WEXT: STOP when iface is UP
02-22 10:28:20.707 1132-1269/? E/ConnectivityService﹕ not failing over to mobile type 0 because Mobile Data Disabled
02-22 10:28:20.707 1132-1269/? E/ConnectivityService﹕ not failing over to mobile type 2 because Mobile Data Disabled
02-22 10:28:20.707 1132-1269/? E/ConnectivityService﹕ not failing over to mobile type 3 because Mobile Data Disabled
02-22 10:28:20.707 1132-1269/? E/ConnectivityService﹕ not failing over to mobile type 4 because Mobile Data Disabled
02-22 10:28:20.707 1132-1269/? E/ConnectivityService﹕ not failing over to mobile type 5 because Mobile Data Disabled
02-22 10:28:21.467 1132-1350/? E/ActivityManager﹕ heap conf. property name string trimmed: hs.com.google.android.apps.uplo
02-22 10:28:51.788 1331-1331/? E/SIM_STK﹕ Inititating Monitor
02-22 10:29:09.147 29533-29533/? E/wpa_supplicant﹕ ioctl[SIOCSIWSCAN]
02-22 10:29:11.257 1038-1277/? E/SuperExtractor﹕ File not supported
02-22 10:29:11.397 1132-29539/? E/﹕ dhcp_do_request:: DHCP result prop_value is ok
02-22 10:29:11.397 1132-29539/? E/WifiStateTracker﹕ [dhcp handler] release sWiFiDhcpWakeLock
02-22 10:29:12.860 5456-19974/? E/TalkProvider﹕ replaceContactWithContactId: contactId==0!!! dvasic1@gmail.com, acct=1
02-22 10:29:12.860 5456-19974/? E/TalkProvider﹕ insert presence failed for account=1 username=dvasic1@gmail.com client_type=2 status= cap=0 priority=0 mode=3
02-22 10:29:27.237 1132-1199/? E/Tethering﹕ active iface (usb0) reported as added, ignoring
02-22 10:29:34.677 20019-20019/? E/dalvikvm-heap﹕ Creating VM heap of size start:2097152 max:268435456 base:0x40011000
02-22 10:29:38.900 20056-20056/? E/dalvikvm-heap﹕ Creating VM heap of size start:2097152 max:268435456 base:0x4002d000
02-22 10:29:41.477 1477-20061/? E/RJ﹕ START DB REFRESH
02-22 10:29:42.937 20074-20074/? E/dalvikvm-heap﹕ Creating VM heap of size start:2097152 max:268435456 base:0x40011000
02-22 10:29:47.897 20105-20105/app.sercas.dev E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{app.sercas.dev/app.sercas.dev.map}: android.view.InflateException: Binary XML file line #8: Error inflating class fragment
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:861)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:619)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #8: Error inflating class fragment
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:581)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
at android.view.LayoutInflater.inflate(LayoutInflater.java:408)
at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:213)
at android.app.Activity.setContentView(Activity.java:1663)
at app.sercas.dev.map.onCreate(map.java:17)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:861)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:619)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: android.view.fragment in loader dalvik.system.PathClassLoader[/data/app/app.sercas.dev-1.apk]
at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at android.view.LayoutInflater.createView(LayoutInflater.java:471)
at android.view.LayoutInflater.onCreateView(LayoutInflater.java:549)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:66)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:568)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
at android.view.LayoutInflater.inflate(LayoutInflater.java:408)
at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:213)
at android.app.Activity.setContentView(Activity.java:1663)
at app.sercas.dev.map.onCreate(map.java:17)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:861)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:619)
at dalvik.system.NativeStart.main(Native Method)
02-22 10:29:51.557 1477-1477/? E/AllAppsWorkspace﹕ ***Start*** init Horizontal Grid View, instance id=com.lge.launcher.AllAppsWorkspace@405655b0
02-22 10:29:51.837 1477-1477/? E/AllAppsWorkspace﹕ ***End*** init Horizontal Grid View
02-22 10:29:52.607 1132-22422/? E/ActivityManager﹕ heap conf. property name string trimmed: hs.com.google.android.partnerse
02-22 10:29:52.967 1132-1132/? E/ActivityManager﹕ heap conf. property name string trimmed: hs.com.google.android.apps.maps
02-22 10:29:54.137 1132-1380/? E/ActivityManager﹕ heap conf. property name string trimmed: hs.com.google.android.googlequi
02-22 10:29:54.667 1132-1370/? E/ActivityManager﹕ heap conf. property name string trimmed: hs.com.lge.android.worldclock.w
02-22 10:29:54.827 1132-22421/? E/ActivityManager﹕ heap conf. property name string trimmed: hs.com.google.android.apps.maps
02-22 10:30:09.857 1132-31400/? E/ActivityManager﹕ heap conf. property name string trimmed: hs.com.lge.android.worldclock.w
02-22 10:30:09.907 1038-11210/? E/SuperExtractor﹕ File not supported
02-22 10:30:10.127 15486-20271/? E/ActivityThread﹕ Failed to find provider info for com.facebook.wakizashi.provider.MessagesForegroundProvider
02-22 10:30:10.127 15486-20271/? E/ActivityThread﹕ Failed to find provider info for com.facebook.katana.provider.MessagesForegroundProvider
02-22 10:30:11.208 15486-15486/? E/dalvikvm﹕ Could not find class 'com.facebook.ui.c.d', referenced from method com.facebook.ui.c.c.c
02-22 10:30:11.267 15486-15486/? E/ResourceType﹕ Style contains key with bad entry: 0x0101039c
02-22 10:30:11.497 1038-11210/? E/SuperExtractor﹕ File not supported
02-22 10:30:11.537 1038-11210/? E/AudioPolicyManagerBase﹕ setStreamVolume() for output 1 stream 3, volume 0.000000, delay 0
02-22 10:30:11.537 1038-11210/? E/AudioPolicyManagerBase﹕ setStreamVolume() for output 1 stream 12, volume 0.000000, delay 0
02-22 10:30:12.467 15486-20271/? E/ActivityThread﹕ Failed to find provider info for com.facebook.wakizashi.provider.MessagesForegroundProvider
02-22 10:30:12.477 15486-20271/? E/ActivityThread﹕ Failed to find provider info for com.facebook.katana.provider.MessagesForegroundProvider
02-22 10:30:12.517 15486-20271/? E/ActivityThread﹕ Failed to find provider info for com.facebook.wakizashi.provider.MessagesForegroundProvider
02-22 10:30:12.517 15486-20271/? E/ActivityThread﹕ Failed to find provider info for com.facebook.katana.provider.MessagesForegroundProvider
02-22 10:30:12.617 15486-20271/? E/ActivityThread﹕ Failed to find provider info for com.facebook.wakizashi.provider.MessagesForegroundProvider
02-22 10:30:12.617 15486-20271/? E/ActivityThread﹕ Failed to find provider info for com.facebook.katana.provider.MessagesForegroundProvider
02-22 10:30:12.807 1038-11210/? E/SuperExtractor﹕ File not supported
02-22 10:30:15.807 1038-20287/? E/AudioPolicyManagerBase﹕ setStreamVolume() for output 1 stream 3, volume 0.100000, delay 500
02-22 10:30:15.807 1038-20287/? E/AudioPolicyManagerBase﹕ setStreamVolume() for output 1 stream 12, volume 0.100000, delay 500
02-22 10:30:20.807 15486-15486/? E/ResourceType﹕ Style contains key with bad entry: 0x0101039c
02-22 10:30:21.090 1038-1128/? E/SuperExtractor﹕ File not supported
02-22 10:30:56.037 1132-1199/? E/Tethering﹕ active iface (usb0) reported as added, ignoring
02-22 10:30:57.237 1132-1199/? E/Tethering﹕ active iface (usb0) reported as added, ignoring
02-22 10:31:01.657 29533-29533/? E/wpa_supplicant﹕ WEXT: STOP when iface is UP
02-22 10:31:01.697 1132-1269/? E/ConnectivityService﹕ not failing over to mobile type 0 because Mobile Data Disabled
02-22 10:31:01.697 1132-1269/? E/ConnectivityService﹕ not failing over to mobile type 2 because Mobile Data Disabled
02-22 10:31:01.697 1132-1269/? E/ConnectivityService﹕ not failing over to mobile type 3 because Mobile Data Disabled
02-22 10:31:01.697 1132-1269/? E/ConnectivityService﹕ not failing over to mobile type 4 because Mobile Data Disabled
02-22 10:31:01.697 1132-1269/? E/ConnectivityService﹕ not failing over to mobile type 5 because Mobile Data Disabled
02-22 10:31:04.377 1132-1138/? E/ActivityManager﹕ heap conf. property name string trimmed: hs.com.google.android.apps.uplo
的活动:
public class map extends FragmentActivity {
GoogleMap mMap;
@Override
protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.map_view);
mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)).getMap();
}
}
map_view.xml:
<?xml version="1.0" encoding="utf-8" ?>
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/map"
class="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent" />
任何帮助都会有很大帮助。
编辑:
的Manifest.xml
<?xmlversion="1.0"encoding="utf-8"?>
<manifestxmlns:android="http://schemas.android.com/apk/res/android"
package="app.sercas.dev"
android:versionCode="1"
android:versionName="1.0">
<uses-permissionandroid:name="android.permission.INTERNET"/>
<uses-permissionandroid:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permissionandroid:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permissionandroid:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permissionandroid:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permissionandroid:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-featureandroid:glEsVersion="0x00020000"android:required="true"/>
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="19"/>
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme">
<activity
android:name="app.sercas.dev.map"
android:label="@string/app_name">
<intent-filter>
<actionandroid:name="android.intent.action.MAIN"/>
<categoryandroid:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<meta-dataandroid:name="com.google.android.maps.v2.API_KEY"android:value="AIzaS***********Fg0"/>
<meta-dataandroid:name="com.google.android.gms.version"android:value="@integer/google_play_services_version"/>
</application>
</manifest>
我已编辑该文件以包含清单文件。
答案 0 :(得分:1)
您必须将此permission
添加到您的manifest file
<permission
android:name="app.sercas.dev.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="app.sercas.dev.permission.MAPS_RECEIVE"/>
我认为这是你的遗失。添加此项后,如果你的问题没有解决,那么检查你API-Key
是否正确使用ur computer's SHA-1 fingerprint;app.sercas.dev
生成的。
答案 1 :(得分:0)
在map_view.xml
内,更改:
class="com.google.android.gms.maps.SupportMapFragment"
为:
android:name="com.google.android.gms.maps.SupportMapFragment"
答案 2 :(得分:0)
尝试使用map_view.xml,对我这样:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".map" >
<fragment
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.google.android.gms.maps.SupportMapFragment" />
</RelativeLayout>
答案 3 :(得分:0)
最后得到它的工作应该读取carefilly发现的日志错误:
The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 4030500 but found 4.
所以我更改了元标记上的整数值:
<meta-data android:name="com.google.android.gms.version" android:value="@integer/gp_version" />
值为4030500,现在感谢@kaushik的帮助,如果我没有读过logcat,那么正确的方法就不会发现这个:)