Monodroid android uygulaması üzerinde çalışıyorum. Google haritalarını bir fragmanla ekledim ancak harita görünmeyecek ve herhangi bir hata atılmayacağım.Xamarin Android Google Maps Uygulama haritası boş ve hiçbir hata yok
Benim Axml kodu:
<fragment
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.google.android.gms.maps.MapFragment" />
Etkinlik Kodu:
protected async override void OnResume()
{
base.OnResume();
tblLocations location = Nav.GetAndRemoveParameter<tblLocations>(Intent);
LatLng latLng = new LatLng(location.Latitude, location.Longitude);
CameraPosition.Builder builder = CameraPosition.InvokeBuilder();
builder.Target(latLng);
builder.Zoom(5);
CameraPosition cameraPosition = builder.Build();
CameraUpdate cUpdate = CameraUpdateFactory.NewCameraPosition(cameraPosition);
mapFrag = (MapFragment)FragmentManager.FindFragmentById(Resource.Id.map);
map = mapFrag.Map;
if (map != null)
{
map.MoveCamera(cUpdate);
}
}
Ben API anahtarı ile bir şey fark ama burada ne eksik?
LOG CAT ÇIKIŞI04-01 16:40:24.662 D/ChimeraFileApk(20730): Classloading successful. Optimized code found.
04-01 16:40:24.730 E/NEW_BHD (20811): Battery Power Supply logging Daemon start!!!!!
04-01 16:40:24.730 E/NEW_BHD (20811): Cannot run on production devices!
04-01 16:40:24.755 I/Google Maps Android API(20730): Google Play services client version: 848700004-01 16:40:24.755 I/Google Maps Android API(20730): Google Play services client version: 8487000
04-01 16:40:24.764 I/Google Maps Android API(20730): Google Play services package version: 8703436
04-01 16:40:24.804 I/art (20530): CollectorTransition marksweep + semispace GC freed 471(-32KB) AllocSpace objects, 0(0B) LOS objects, 24% free, 7MB/9MB, paused 16.348ms total 16.348ms
04-01 16:40:25.088 D/VoldConnector(2225): SND -> {10 volume mkdirs /storage/emulated/0/Android/data/asked.askeduniversalremote/cache/}
04-01 16:40:25.220 D/Mono (20730): Assembly Ref addref Xamarin.GooglePlayServices.Maps[0xb9b18688] -> Xamarin.GooglePlayServices.Basement[0xb9b148d0]: 2
04-01 16:40:25.283 I/b (20730): Sending API token request.
04-01 16:40:25.316 I/Keyboard.Facilitator(3831): onFinishInput()
04-01 16:40:25.357 I/LaunchCheckinHandler(2225): Displayed asked.askeduniversalremote/md5d1d3b2ca018abe66d5a9f8b4db614c6f.ViewOtherLocationOnMapActivity,wp,ca,947
04-01 16:40:25.357 I/ActivityManager(2225): Displayed asked.askeduniversalremote/md5d1d3b2ca018abe66d5a9f8b4db614c6f.ViewOtherLocationOnMapActivity: +947ms
04-01 16:40:25.372 E/NetlinkEvent( 299): NetlinkEvent::FindParam(): Parameter 'UID' not found
04-01 16:40:25.612 I/b (20730): Received API Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
04-01 16:40:25.612 I/c (20730): Scheduling next attempt in 431700 seconds.
04-01 16:40:25.615 I/d (20730): Saved auth token
04-01 16:40:25.719 I/SFPerfTracer( 258): triggers: (rate: 7:437) (compose: 1:20) (post: 0:21) (render: 2:51) (6:7515 frames) (7:10501)
04-01 16:40:25.719 D/SFPerfTracer( 258): layers: (3:12) (FocusedStackFrame (0xb782cb78): 0:383)* (DimLayer (0xb786b8f0): 0:2)* (StrictModeFlash (0xb7804b60): 0:50)* (StatusBar (0xb780a350): 0:2953) (com.android.systemui.ImageWallpaper (0xb781e148): 0:163)* (NavigationBar (0xb78a5528): 0:402) (DimLayer (0xb7892338): 1:14)* (asked.askeduniversalremote/md5d1d3b2ca018abe66d5a9f8b4db614c6f.WaitTimeActivity (0xb789fa28): 0:51)- (asked.askeduniversalremote/md5d1d3b2ca018abe66d5a9f8b4db614c6f.ViewOtherSitesActivity (0xb78aef90): 0:108)- (asked.askeduniversalremote/md5d1d3b2ca018abe66d5a9f8b4db614c6f.ViewOtherLocationOnMapActivity (0xb789f9e0): 7:25)
04-01 16:40:27.516 D/audio_hw_primary( 303): out_standby: enter: stream (0xb7690308) usecase(1: low-latency-playback)04-01 16:40:27.516 D/audio_hw_primary( 303): out_standby: enter: stream (0xb7690308) usecase(1: low-latency-playback)
04-01 16:40:27.616 D/hardware_info( 303): hw_info_append_hw_type : device_name = speaker04-01 16:40:27.616 D/hardware_info( 303): hw_info_append_hw_type : device_name = speaker
04-01 16:40:29.766 E/NEW_BHD (20866): Cannot run on production devices!
04-01 16:40:31.127 D/Mono (20730): [0x9e1ff930] worker finishing
04-01 16:40:31.167 D/WifiStateMachine(2225): starting scan for
04-01 16:40:34.778 D/SLPC (3416): slpc_poll_loop(): handled 1
04-01 16:40:34.778 D/SLPC (3416): slpc_poll_handle_event(): transition
04-01 16:40:34.778 D/SLPC (3416): slpc_poll_loop(): about to poll...
04-01 16:40:34.778 D/sensorhub(3416): sensorhub_poll() polling...
04-01 16:40:34.796 E/NEW_BHD (20867): Battery Power Supply logging Daemon start!!!!!
04-01 16:40:34.797 E/NEW_BHD (20867): Cannot run on production devices!
04-01 16:40:35.292 D/NetlinkSocketObserver(2225): NeighborEvent{elapsedMs=6311820, 192.168.105.1, [C86C870B13EB], RTM_NEWNEIGH, NUD_STALE}
04-01 16:40:35.783 V/AlarmManager(2225): sending alarm {58361af type 2 *walarm*:com.motorola.slpc.ALARM_STOWED}
04-01 16:40:35.786 D/ModalityService(3416): StowedListener(): callback onStowedChange() -> 2
04-01 16:40:35.787 V/AlarmManager(2225): done {58361af, *walarm*:com.motorola.slpc.ALARM_STOWED} [4ms]
04-01 16:40:35.787 D/ModalityManager(5416): onStowedChange() -> 2, package: com.motorola.actions
GÜNCELLEME Logcat şimdi
04-04 09:30:07.355 W/ctxmgr (4204): [AclManager]checkPermissionTypeStatus: no inject permission for { uid=10019, packageName=com.google.android.gms }. Returned permission was: PACKAGE_NOT_WHITELISTED for context name=POWER_CONNECTION, account=account#-517948760#
04-04 09:30:07.358 W/ctxmgr (4204): [AclManager]checkPermissionTypeStatus: no inject permission for { uid=10019, packageName=com.google.android.gms }. Returned permission was: PACKAGE_NOT_WHITELISTED for context name=POWER_CONNECTION, account=account#-517948760#
başvurunuzu çalıştırdığınızda 'adb ne der logcat' gelir? –
Anahtarı iyi aldı. Anahtarı logcat'tan kaldırdım ama göremediğim bir hata yok. – yams
HaritanızFrag.Map null? – Blueberry