我正在使用pagerAdapter顯示帶有片段支持的內容。我得到錯誤Android頁面適配器問題:java.lang.NoSuchMethodError:android.webkit.WebView.setLayerType
java.lang.NoSuchMethodError: android.webkit.WebView.setLayerType
當我在Android 2.2或更低版本上運行應用程序。但在Android 4.0的設備上,這工作正常。請錯誤檢查日誌細節:
java.lang.NoSuchMethodError: android.webkit.WebView.setLayerType
02-28 11:19:08.205: ERROR/AndroidRuntime(27823): at com.dealdetails.MyFragment.onCreateView(MyFragment.java:415)
02-28 11:19:08.205: ERROR/AndroidRuntime(27823): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:871)
02-28 11:19:08.205: ERROR/AndroidRuntime(27823): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1083)
02-28 11:19:08.205: ERROR/AndroidRuntime(27823): at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:635)
02-28 11:19:08.205: ERROR/AndroidRuntime(27823): at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1431)
02-28 11:19:08.205: ERROR/AndroidRuntime(27823): at android.support.v4.app.FragmentManagerImpl.executePendingTransactions(FragmentManager.java:431)
02-28 11:19:08.205: ERROR/AndroidRuntime(27823): at android.support.v4.app.FragmentStatePagerAdapter.finishUpdate(FragmentStatePagerAdapter.java:160)
02-28 11:19:08.205: ERROR/AndroidRuntime(27823): at android.support.v4.view.ViewPager.populate(ViewPager.java:895)
02-28 11:19:08.205: ERROR/AndroidRuntime(27823): at android.support.v4.view.ViewPager.populate(ViewPager.java:772)
02-28 11:19:08.205: ERROR/AndroidRuntime(27823): at android.support.v4.view.ViewPager.setAdapter(ViewPager.java:380)
02-28 11:19:08.205: ERROR/AndroidRuntime(27823): at my_package.main_View_Pager(my_java_class.java:1214)
請建議我怎麼能沒有錯誤的設備與操作系統級別提前
添運行應用程序< 2.2
感謝。
你的代碼是什麼樣的,特別是在MyFragment.java上的第415行? – Krylez 2013-02-28 06:59:35