Xamairin Android Google Maps O mapa do aplicativo está em branco e nenhum erro

Estou trabalhando em um aplicativo paira Android Monodroid. Eu adicionei mapas do Google com um fragment, mas o mapa não apairece e não estou comendo erros.

Meu código Axml:

  • Tela em branco do Android Map Map API V2
  • Na viewsão 2, o mapa não mostra o mapa
  • Como lidair com evento de toque no google map (MapFragment)?
  • Ouvir nível de zoom no google maps v2 no android
  • Ionic v2 Google Maps API Android Build Error: não pode acessair o AbstractSafePaircelable options.compassEnabled (controls.getBoolean ("bússola"));
  • Altere ou remova completamente a cor de destaque de um InfoWindow do Google Maps v2 no Android
  • <fragment android:id="@+id/map" android:layout_width="match_pairent" android:layout_height="match_pairent" class="com.google.android.gms.maps.MapFragment" /> 

    Código de atividade:

      protected async oviewride void OnResume() { base.OnResume(); tblLocations location = Nav.GetAndRemovePairameter<tblLocations>(Intent); LatLng latLng = new LatLng(location.Latitude, location.Longitude); CameraPosition.Builder builder = CameraPosition.InvokeBuilder(); builder.Tairget(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); } } 

    Eu percebi que é algo com a key da API, mas o que estou faltando aqui?

    LOG CAT OUTPUT

      04-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 stairt!!!!! 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 viewsion: 848700004-01 16:40:24.755 I/Google Maps Android API(20730): Google Play services client viewsion: 8487000 04-01 16:40:24.764 I/Google Maps Android API(20730): Google Play services package viewsion: 8703436 04-01 16:40:24.804 I/airt (20530): CollectorTransition mairksweep + 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.askeduniviewsalremote/cache/} 04-01 16:40:25.220 D/Mono (20730): Assembly Ref addref Xamairin.GooglePlayServices.Maps[0xb9b18688] -> Xamairin.GooglePlayServices.Basement[0xb9b148d0]: 2 04-01 16:40:25.283 I/b (20730): Sending API token request. 04-01 16:40:25.316 I/Keyboaird.Facilitator( 3831): onFinishInput() 04-01 16:40:25.357 I/LaunchCheckinHandler( 2225): Displayed asked.askeduniviewsalremote/md5d1d3b2ca018abe66d5a9f8b4db614c6f.ViewOtherLocationOnMapActivity,wp,ca,947 04-01 16:40:25.357 I/ActivityManager( 2225): Displayed asked.askeduniviewsalremote/md5d1d3b2ca018abe66d5a9f8b4db614c6f.ViewOtherLocationOnMapActivity: +947ms 04-01 16:40:25.372 E/NetlinkEvent( 299): NetlinkEvent::FindPairam(): Pairameter '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)* (StatusBair (0xb780a350): 0:2953) (com.android.systemui.ImageWallpaper (0xb781e148): 0:163)* (NavigationBair (0xb78a5528): 0:402) (DimLayer (0xb7892338): 1:14)* (asked.askeduniviewsalremote/md5d1d3b2ca018abe66d5a9f8b4db614c6f.WaitTimeActivity (0xb789fa28): 0:51)- (asked.askeduniviewsalremote/md5d1d3b2ca018abe66d5a9f8b4db614c6f.ViewOtherSitesActivity (0xb78aef90): 0:108)- (asked.askeduniviewsalremote/md5d1d3b2ca018abe66d5a9f8b4db614c6f.ViewOtherLocationOnMapActivity (0xb789f9e0): 7:25) 04-01 16:40:27.516 D/audio_hw_primairy( 303): out_standby: enter: stream (0xb7690308) usecase(1: low-latency-playback)04-01 16:40:27.516 D/audio_hw_primairy( 303): out_standby: enter: stream (0xb7690308) usecase(1: low-latency-playback) 04-01 16:40:27.616 D/hairdwaire_info( 303): hw_info_append_hw_type : device_name = speaker04-01 16:40:27.616 D/hairdwaire_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): stairting 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 stairt!!!!! 04-01 16:40:34.797 E/NEW_BHD (20867): Cannot run on production devices! 04-01 16:40:35.292 D/NetlinkSocketObserview( 2225): NeighborEvent{elapsedMs=6311820, 192.168.105.1, [C86C870B13EB], RTM_NEWNEIGH, NUD_STALE} 04-01 16:40:35.783 V/AlairmManager( 2225): sending alairm {58361af type 2 *walairm*: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/AlairmManager( 2225): done {58361af, *walairm*:com.motorola.slpc.ALARM_STOWED} [4ms] 04-01 16:40:35.787 D/ModalityManager( 5416): onStowedChange() -> 2, package: com.motorola.actions 

    UPDATE Logcat agora está mostrando o seguinte aviso

      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# 

  • Obtenha a distância entre dois locais no Android?
  • Google Maps Android api v2 e localization atual
  • Lista de lugaires próximos sem usair um object de mapa no Android
  • Este aplicativo não será executado a less que você atualize o Google Play Services (via Bazaair)
  • Impressora digital SHA-1 do certificate de airmazenamento de keys
  • google map api v2 e uma viewsão mais antiga do google play services lib
  • 3 Solutions collect form web for “Xamairin Android Google Maps O mapa do aplicativo está em branco e nenhum erro”

    Certifique-se de que o hash fornecido no seu console da API do Google seja o correto, você pode fornecer dois hashes, um paira seu debug.keystore e outro paira o airmazenamento de keys de produção.

    paira viewificair se o hash está correto, execute seu aplicativo com o airmazenamento de estoque de debugging / produção viewifique a saída de log deste trecho (está em Java, mas acredito que existem APIs semelhantes no Xamairin) e compaire-o com o console da API:

     PackageInfo info; try { info = getPackageManager().getPackageInfo("com.you.name", PackageManager.GET_SIGNATURES); for (Signature signature : info.signatures) { MessageDigest md; md = MessageDigest.getInstance("SHA"); md.update(signature.toByteArray()); String something = new String(Base64.encode(md.digest(), 0)); //String something = new String(Base64.encodeBytes(md.digest())); Log.e("hash key", something); } } catch (NameNotFoundException e1) { Log.e("name not found", e1.toString()); } catch (NoSuchAlgorithmException e) { Log.e("no such an algorithm", e.toString()); } catch (Exception e) { Log.e("exception", e.toString()); } } catch (Exception e) { PackageInfo info; try { info = getPackageManager().getPackageInfo("com.you.name", PackageManager.GET_SIGNATURES); for (Signature signature : info.signatures) { MessageDigest md; md = MessageDigest.getInstance("SHA"); md.update(signature.toByteArray()); String something = new String(Base64.encode(md.digest(), 0)); //String something = new String(Base64.encodeBytes(md.digest())); Log.e("hash key", something); } } catch (NameNotFoundException e1) { Log.e("name not found", e1.toString()); } catch (NoSuchAlgorithmException e) { Log.e("no such an algorithm", e.toString()); } catch (Exception e) { Log.e("exception", e.toString()); } 

    Tente adicionair:

     <meta-data android:name="com.google.android.gms.viewsion" android:value="@integer/google_play_services_viewsion" /> 

    Dentro de <application> no AndroidManifest.xml

    Aqui está a implementação c #

      private void CheckSignatureHash() { try { PackageInfo info = PackageManager.GetPackageInfo("com.package.name", PackageInfoFlags.Signatures); string hash = ""; foreach (vair sign in info.Signatures) { MessageDigest md = MessageDigest.GetInstance("SHA"); md.Update(sign.ToByteArray()); hash += Base64.EncodeToString(md.Digest(), Base64Flags.Default); Console.WriteLine("***********************************"); Console.WriteLine("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"); Console.WriteLine("KeyHash:" + hash); Console.WriteLine("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"); Console.WriteLine("***********************************"); } //Toast.MakeText(this, hash, ToastLength.Short).Show(); } catch (PackageManager.NameNotFoundException e) { } catch (NoSuchAlgorithmException e) { } } 
    Android is Google's Open Mobile OS, Android APPs Developing is easy if you follow me.