有时当我重新启动我的应用程序进行测试时,我会被抛出致命的侮辱.不会一直发生,我正在通过我的设备测试而不是模拟器,就像我一直这样.我没有看到我的代码出错的行,所以不确定该怎么做?
03-24 16:26:24.692: E/AndroidRuntime(1407): FATAL EXCEPTION: main
03-24 16:26:24.692: E/AndroidRuntime(1407): Process: com.jameswilson.fairbook, PID: 1407
03-24 16:26:24.692: E/AndroidRuntime(1407): java.lang.RuntimeException: Unable to instantiate application com.jameswilson.fairbook.FairBookApplication: java.lang.IllegalStateException: Unable to get package info for com.jameswilson.fairbook; is package not installed?
03-24 16:26:24.692: E/AndroidRuntime(1407): at android.app.LoadedApk.makeApplication(LoadedApk.java:516)
03-24 16:26:24.692: E/AndroidRuntime(1407): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4317)
03-24 16:26:24.692: E/AndroidRuntime(1407): at android.app.ActivityThread.access$1500(ActivityThread.java:135)
03-24 16:26:24.692: E/AndroidRuntime(1407): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
03-24 16:26:24.692: E/AndroidRuntime(1407): at android.os.Handler.dispatchMessage(Handler.java:102)
03-24 16:26:24.692: E/AndroidRuntime(1407): at android.os.Looper.loop(Looper.java:136) 03-24 16:26:24.692: E/AndroidRuntime(1407): at android.app.ActivityThread.main(ActivityThread.java:5017)
03-24 16:26:24.692: E/AndroidRuntime(1407): at java.lang.reflect.Method.invokeNative(Native Method)
03-24 16:26:24.692: E/AndroidRuntime(1407): at …Run Code Online (Sandbox Code Playgroud) 我正在尝试通过Google Places API将我当前加载到注释中的数据传递到我通过带有segue的故事板创建的详细视图控制器中.
我在单击每个注释上的详细信息披露时正确加载了详细视图控制器,但我正在尝试获取现在传递的数据.
- (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control
{
// Assuming I call the MapPoint class here and set it to the current annotation
// then I'm able to call each property from the MapPoint class but wouldn't
// I have to set this in the prepareForSegue but that would be out of scope?
MapPoint *annView = view.annotation;
// annView.name
// annView.address
[self performSegueWithIdentifier:@"showBarDetails" sender:view];
}
-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if([[segue identifier] isEqualToString:@"showBarDetails"])
{
BarDetailViewController *bdvc = …Run Code Online (Sandbox Code Playgroud)