爲什麼UNKNOW錯誤信息,這裏的地圖我跟所有的步驟 文檔中提供的過程中拋出。註冊開發者控制檯,我使用的是正確的appid,appCode,appApiKey這裏地圖錯誤的Android應用程序未知信息彈出
@Override
protected void onCreate(Bundle savedInstanceState) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
Window window = getWindow();
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
window.setStatusBarColor(getResources().getColor(R.color.clr_black));
}
super.onCreate(savedInstanceState);
setContentView(R.layout.my_location);
getSupportActionBar().setDefaultDisplayHomeAsUpEnabled(true);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setElevation(0);
// Search for the map fragment to finish setup by calling init().
mapFragment = (MapFragment)getFragmentManager().findFragmentById(R.id.mapfragment);
mapFragment.init(new OnEngineInitListener() {
@Override
public void onEngineInitializationCompleted(OnEngineInitListener.Error error) {
if (error == OnEngineInitListener.Error.NONE) {
// retrieve a reference of the map from the map fragment
map = mapFragment.getMap();
// Set the map center to the Vancouver region (no animation)
map.setCenter(new GeoCoordinate(49.196261, -123.004773, 0.0),
Map.Animation.NONE);
// Set the zoom level to the average between min and max
map.setZoomLevel(
(map.getMaxZoomLevel() + map.getMinZoomLevel())/2);
} else {
System.out.println("ERROR: Cannot initialize Map Fragment " + error.toString());
Toast.makeText(MyLocation.this, " Error: " + error.toString(), Toast.LENGTH_LONG).show();
}
}
});
}
any suggestions.
粘貼您的日誌文件 – Neha