我遇到了一个奇怪的问题..我正在制作一个Custom Contact应用程序,我今天使用Fragments重构了我的应用程序...我使用Communicator设计模式将所选联系人的ID传递给右侧的联系人详细信息Fragmet以显示联系人的详细信息...该应用程序现在在智能手机中运行完美,我已经放置了单个活动布局但如果我在平板电脑中运行相同(布局 - 大型有2片碎片)它的力量关闭它告诉一些有线错误..Tried在google搜索它并且厌倦了..我将在这里发布日志信息请帮助我..有些问题与v4支持库和Sqlite查询但无法解决..请帮助..如果你特别需要任何代码告诉我,我会发布它
11-26 00:00:38.377: E/AndroidRuntime(3273): FATAL EXCEPTION: main
11-26 00:00:38.377: E/AndroidRuntime(3273): java.lang.RuntimeException: Unable to resume activity {com.example.mysamplelistfragment/com.example.mysamplelistfragment.MainActivity}: java.lang.IllegalArgumentException: the bind value at index 1 is null
11-26 00:00:38.377: E/AndroidRuntime(3273): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2575)
11-26 00:00:38.377: E/AndroidRuntime(3273): at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2603)
11-26 00:00:38.377: E/AndroidRuntime(3273): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2089)
11-26 00:00:38.377: E/AndroidRuntime(3273): at android.app.ActivityThread.access$600(ActivityThread.java:130)
11-26 00:00:38.377: E/AndroidRuntime(3273): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
11-26 00:00:38.377: E/AndroidRuntime(3273): at android.os.Handler.dispatchMessage(Handler.java:99)
11-26 00:00:38.377: E/AndroidRuntime(3273): at android.os.Looper.loop(Looper.java:137)
11-26 00:00:38.377: E/AndroidRuntime(3273): at android.app.ActivityThread.main(ActivityThread.java:4745)
11-26 00:00:38.377: E/AndroidRuntime(3273): at java.lang.reflect.Method.invokeNative(Native Method)
11-26 00:00:38.377: E/AndroidRuntime(3273): at java.lang.reflect.Method.invoke(Method.java:511)
11-26 00:00:38.377: E/AndroidRuntime(3273): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
11-26 00:00:38.377: E/AndroidRuntime(3273): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
11-26 00:00:38.377: E/AndroidRuntime(3273): at dalvik.system.NativeStart.main(Native Method)
11-26 00:00:38.377: E/AndroidRuntime(3273): Caused by: java.lang.IllegalArgumentException: the bind value at index 1 is null
11-26 00:00:38.377: E/AndroidRuntime(3273): at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:170)
11-26 00:00:38.377: E/AndroidRuntime(3273): at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:140)
11-26 00:00:38.377: E/AndroidRuntime(3273): at android.content.ContentProviderProxy.query(ContentProviderNative.java:366)
11-26 00:00:38.377: E/AndroidRuntime(3273): at android.content.ContentResolver.query(ContentResolver.java:370)
11-26 00:00:38.377: E/AndroidRuntime(3273): at android.content.ContentResolver.query(ContentResolver.java:313)
11-26 00:00:38.377: E/AndroidRuntime(3273): at com.example.mysamplelistfragment.ContactDetailsFragment.onResume(ContactDetailsFragment.java:57)
11-26 00:00:38.377: E/AndroidRuntime(3273): at android.support.v4.app.Fragment.performResume(Fragment.java:1543)
11-26 00:00:38.377: E/AndroidRuntime(3273): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:963)
11-26 00:00:38.377: E/AndroidRuntime(3273): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1104)
11-26 00:00:38.377: E/AndroidRuntime(3273): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1086)
11-26 00:00:38.377: E/AndroidRuntime(3273): at android.support.v4.app.FragmentManagerImpl.dispatchResume(FragmentManager.java:1894)
11-26 00:00:38.377: E/AndroidRuntime(3273): at android.support.v4.app.FragmentActivity.onResumeFragments(FragmentActivity.java:466)
11-26 00:00:38.377: E/AndroidRuntime(3273): at android.support.v4.app.FragmentActivity.onPostResume(FragmentActivity.java:455)
11-26 00:00:38.377: E/AndroidRuntime(3273): at android.app.Activity.performResume(Activity.java:5095)
11-26 00:00:38.377: E/AndroidRuntime(3273): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2565)
11-26 00:00:38.377: E/AndroidRuntime(3273): ... 12 more
答案 0 :(得分:1)
你已经覆盖了像onCreate of Activity这样的片段创建。 ......两者都不同请理解