2008年8月19日星期二

ArcGIS Mobile 9.3 开发的Missing ArcGIS registry key错误

以前没有注意到这个问题,今天换了一个模拟器调试原先的程序,抛出“Missing ArcGIS registry key”错误。

这与ArcGIS Mobile的开发环境配置不人性化有关。我们知道ArcEngine开发桌面程序需要目标机器安装Runtime,但是开发机器的环境已经包含了 Runtime。ArcGIS Mobile与此类似,部署的时候需要在目标设备上安装ArcGIS Mobile Runtime,但是开发调试时并不会自动部署,因此需要你首先手动安装。

安装包是“%ARCGIS_HOME%\DotNet\WindowsCE\Install\AGMRuntime.CAB”,对于定制的WinCE平台,可能需要安装AGMRTWinCE.CAB

2 条评论:

匿名 说...

试试看了!

匿名 说...

arcgis mobile产品不支持 windows ce 5.0操作系统吗?
我使用的是windows ce 5.0模拟器,
为何如下的简单代码:
private void Form1_Load(object sender, EventArgs e)
{ mobileService1.CacheStoragePath = "\\mobiletestData";

//确保你的设备上确实存在\mobiletestData目录,并且目录下有mobilecache地图数据
if (!System.IO.Directory.Exists(mobileService1.CacheStoragePath))
{MessageBox.Show("No exist directory");
return;
}
if (!mobileService1.IsValid)
{MessageBox.Show("Map Cache is not valid!"); return;
}
try
{ mobileService1.Open(ESRI.ArcGIS.Mobile.MobileServices.CacheOpenMode.CreateNew);
}
catch(Exception exception)
MessageBox.Show("Cannot open map cache");
}
}
当执行到open()函数时,总是如下错误:
未处理 System.InvalidOperationException

Message="Cannot load \\Program Files\\ArcGIS Mobile\\ESRIMobileCore.dll, error - 0."

StackTrace:

at ESRI.ArcGIS.Mobile.Native.WindowsApi.LoadCore()

at ESRI.ArcGIS.Mobile.MobileCoreApi..cctor()

at ESRI.ArcGIS.Mobile.MobileServices.MobileService.CreateCache()

at ESRI.ArcGIS.Mobile.MobileServices.MobileService.Open()

at ESRI.ArcGIS.Mobile.MobileServices.MobileService.Open()

at DeviceApplication1.Form1.button1_Click()

at System.Windows.Forms.Control.OnClick()

at System.Windows.Forms.Button.OnClick()

at System.Windows.Forms.ButtonBase.WnProc()

at System.Windows.Forms.Control._InternalWnProc()

at Microsoft.AGL.Forms.EVL.EnterMainLoop()

at System.Windows.Forms.Application.Run()

at DeviceApplication1.Program.Main()