タブ内にフラグメントを含むアプリを作成しています。これで、アプリ内課金リクエストの購入を呼び出そうとすると、以下に貼り付けられたエラーが表示されます。
アプリ内でのフラグメント呼び出しの設計は次のとおりです。
CalendarUIActivity (FragmentActivity) -> CalendarUIMain (Fragment) -> When the user ask for more then InAppSubsricbe (DialogFragment) -> On click of OK of above dialog another dialog fragment got open with list of In-App Products which InAppProductsList(DialogFragment)
Dialog Fragment から製品のリストをクリックするEdit it redirects it method to main CalendarUIMain Fragment at that time
と、マーケット購入画面が正常に開いた状態でエラーが表示されます (以下に貼り付けます)。
04-11 09:10:52.450: E/AndroidRuntime(1966): FATAL EXCEPTION: main
04-11 09:10:52.450: E/AndroidRuntime(1966): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.uks.android.epn.activity/com.uks.android.epn.activity.MainActivity}: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.uks.android.epn.activity/com.uks.android.epn.activity.CalendarUIActivity}: android.support.v4.app.Fragment$InstantiationException: Unable to instantiate fragment com.uks.android.epn.fragments.CalendarUIMain$InAppProductsDialog: make sure class name exists, is public, and has an empty constructor that is public
04-11 09:10:52.450: E/AndroidRuntime(1966): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1818)
04-11 09:10:52.450: E/AndroidRuntime(1966): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1834)
04-11 09:10:52.450: E/AndroidRuntime(1966): at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3200)
04-11 09:10:52.450: E/AndroidRuntime(1966): at android.app.ActivityThread.access$600(ActivityThread.java:125)
04-11 09:10:52.450: E/AndroidRuntime(1966): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1031)
04-11 09:10:52.450: E/AndroidRuntime(1966): at android.os.Handler.dispatchMessage(Handler.java:99)
04-11 09:10:52.450: E/AndroidRuntime(1966): at android.os.Looper.loop(Looper.java:132)
04-11 09:10:52.450: E/AndroidRuntime(1966): at android.app.ActivityThread.main(ActivityThread.java:4135)
04-11 09:10:52.450: E/AndroidRuntime(1966): at java.lang.reflect.Method.invokeNative(Native Method)
04-11 09:10:52.450: E/AndroidRuntime(1966): at java.lang.reflect.Method.invoke(Method.java:491)
04-11 09:10:52.450: E/AndroidRuntime(1966): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
04-11 09:10:52.450: E/AndroidRuntime(1966): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
04-11 09:10:52.450: E/AndroidRuntime(1966): at dalvik.system.NativeStart.main(Native Method)
04-11 09:10:52.450: E/AndroidRuntime(1966): Caused by: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.uks.android.epn.activity/com.uks.android.epn.activity.CalendarUIActivity}: android.support.v4.app.Fragment$InstantiationException: Unable to instantiate fragment com.uks.android.epn.fragments.CalendarUIMain$InAppProductsDialog: make sure class name exists, is public, and has an empty constructor that is public
04-11 09:10:52.450: E/AndroidRuntime(1966): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1818)
04-11 09:10:52.450: E/AndroidRuntime(1966): at android.app.ActivityThread.startActivityNow(ActivityThread.java:1659)
04-11 09:10:52.450: E/AndroidRuntime(1966): at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:135)
04-11 09:10:52.450: E/AndroidRuntime(1966): at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:347)
04-11 09:10:52.450: E/AndroidRuntime(1966): at android.widget.TabHost$IntentContentStrategy.getContentView(TabHost.java:676)
04-11 09:10:52.450: E/AndroidRuntime(1966): at android.widget.TabHost.setCurrentTab(TabHost.java:345)
04-11 09:10:52.450: E/AndroidRuntime(1966): at android.widget.TabHost.addTab(TabHost.java:235)
04-11 09:10:52.450: E/AndroidRuntime(1966): at com.uks.android.epn.activity.MainActivity.addTab(MainActivity.java:78)
04-11 09:10:52.450: E/AndroidRuntime(1966): at com.uks.android.epn.activity.MainActivity.initTabs(MainActivity.java:45)
04-11 09:10:52.450: E/AndroidRuntime(1966): at com.uks.android.epn.activity.MainActivity.onCreate(MainActivity.java:35)
04-11 09:10:52.450: E/AndroidRuntime(1966): at android.app.Activity.performCreate(Activity.java:4397)
04-11 09:10:52.450: E/AndroidRuntime(1966): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1048)
04-11 09:10:52.450: E/AndroidRuntime(1966): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1782)
04-11 09:10:52.450: E/AndroidRuntime(1966): ... 12 more
04-11 09:10:52.450: E/AndroidRuntime(1966): Caused by: android.support.v4.app.Fragment$InstantiationException: Unable to instantiate fragment com.uks.android.epn.fragments.CalendarUIMain$InAppProductsDialog: make sure class name exists, is public, and has an empty constructor that is public
04-11 09:10:52.450: E/AndroidRuntime(1966): at android.support.v4.app.Fragment.instantiate(Fragment.java:395)
04-11 09:10:52.450: E/AndroidRuntime(1966): at android.support.v4.app.FragmentState.instantiate(Fragment.java:96)
04-11 09:10:52.450: E/AndroidRuntime(1966): at android.support.v4.app.FragmentManagerImpl.restoreAllState(FragmentManager.java:1726)
04-11 09:10:52.450: E/AndroidRuntime(1966): at android.support.v4.app.FragmentActivity.onCreate(FragmentActivity.java:198)
04-11 09:10:52.450: E/AndroidRuntime(1966): at com.uks.android.epn.activity.ActivitysTab.onCreate(ActivitysTab.java:25)
04-11 09:10:52.450: E/AndroidRuntime(1966): at com.uks.android.epn.activity.CalendarUIActivity.onCreate(CalendarUIActivity.java:23)
04-11 09:10:52.450: E/AndroidRuntime(1966): at android.app.Activity.performCreate(Activity.java:4397)
04-11 09:10:52.450: E/AndroidRuntime(1966): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1048)
04-11 09:10:52.450: E/AndroidRuntime(1966): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1782)
04-11 09:10:52.450: E/AndroidRuntime(1966): ... 24 more
04-11 09:10:52.450: E/AndroidRuntime(1966): Caused by: java.lang.InstantiationException: com.uks.android.epn.fragments.CalendarUIMain$InAppProductsDialog
04-11 09:10:52.450: E/AndroidRuntime(1966): at java.lang.Class.newInstanceImpl(Native Method)
04-11 09:10:52.450: E/AndroidRuntime(1966): at java.lang.Class.newInstance(Class.java:1301)
04-11 09:10:52.450: E/AndroidRuntime(1966): at android.support.v4.app.Fragment.instantiate(Fragment.java:384)
04-11 09:10:52.450: E/AndroidRuntime(1966): ... 32 more
コードについては、このリンクを参照してください (コードがやや大きいため)。リンク
前もって感謝します。