diff --git a/app/src/main/java/com/shatyuka/zhiliao/Helper.java b/app/src/main/java/com/shatyuka/zhiliao/Helper.java index fdbcb52..e27c183 100644 --- a/app/src/main/java/com/shatyuka/zhiliao/Helper.java +++ b/app/src/main/java/com/shatyuka/zhiliao/Helper.java @@ -219,9 +219,14 @@ static boolean init(ClassLoader classLoader) { try { ContentMixAdapter = classLoader.loadClass("com.zhihu.android.mix.a.a"); getItemCount = ContentMixAdapter.getMethod("getItemCount"); - } catch (NoSuchMethodException e) { - ContentMixAdapter = classLoader.loadClass("com.zhihu.android.mix.b.a"); - getItemCount = ContentMixAdapter.getMethod("getItemCount"); + } catch (Throwable e) { + try { + ContentMixAdapter = classLoader.loadClass("com.zhihu.android.mix.b.a"); + getItemCount = ContentMixAdapter.getMethod("getItemCount"); + } catch (Throwable e2) { + ContentMixAdapter = classLoader.loadClass("com.zhihu.android.mix.adapter.a"); + getItemCount = ContentMixAdapter.getMethod("getItemCount"); + } } ContentMixPagerFragment = classLoader.loadClass("com.zhihu.android.mix.fragment.ContentMixPagerFragment"); ContentMixAdapter_fragment = ContentMixAdapter.getDeclaredField("f");