写个了小程序,获取手机的一些信息。 调用的是 Androidapi.JNI.Telephony这个下面的 JCellIdentityGsm, 这个函数的get cid ,出错,出错提示为“Access violation at address 4097C5Ec,accessing address 0000002C. 点击按钮,出现上面的出错。具体是到get cid这步提示的。希望各位大侠能给一下提示或解答。代码如下: procedure TCellinformation.btnGetCarrierInfoClick(Sender: TObject); var PhoneDialerService: IFMXPhoneDialerService; CellIDService:JCellIdentityGsm; Jgsm: JCellIdentityGsm; begin { test whether the PhoneDialer services are supported } if TPlatformServices.Current.SupportsPlatformService(IFMXPhoneDialerService, IInterface(PhoneDialerService)) then begin { if yes, then update the labels with the retrieved information } CarrierNameItem.ItemData.Detail := PhoneDialerService.GetCarrier.GetCarrierName; CountryCodeItem.ItemData.Detail := PhoneDialerService.GetCarrier.GetIsoCountryCode; NetworkCodeItem.ItemData.Detail := PhoneDialerService.GetCarrier.GetMobileCountryCode; MobileNetworkItem.ItemData.Detail := PhoneDialerService.GetCarrier.GetMobileNetwork; Jgsm:= TJCellIdentityGsm.Create; CELLIDItem.ItemData.Detail:=Jgsm.getCid.toString); end else ShowMessage('不支持的服务');