的谷歌地圖API V2顯示,即使我使用谷歌手機的mapdemo項目發揮服務樣本Android的 - 谷歌地圖黑屏
- 我重新安裝谷歌播放服務SDK空白屏幕。
- 我改變了API密鑰
- 我改變了debug.keystore和重新生成SHA1指紋
什麼都沒有改變......
和MMAP總是空????
if (mMap == null) {
// Try to obtain the map from the SupportMapFragment.
mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)) .getMap();
// Check if we were successful in obtaining the map.
if (mMap != null) {
setUpMap();
}
始終顯示您嘗試的代碼以及問題。其次,已經允許你在互聯網上的權限Manifest.xml? –
是的,我允許互聯網 if(mMap == null){ //嘗試從SupportMapFragment獲取地圖。 mMap =((SupportMapFragment)getSupportFragmentManager()。findFragmentById(R.id.map)) .getMap(); //檢查我們是否成功獲取地圖。 if(mMap!= null)setUpMap(); } mMap總是爲空任何原因? –
仔細按照鏈接,一定會工作https://developers.google.com/maps/documentation/android/map –