我在片段活动上创建了一个带有recyclerview的项目。但是当我执行这个项目时显示这样的错误。在回收者查看时,应用程序本身的值没有任何错误。但是,当我尝试从firebase检索值到应用程序时显示此错误,并且活动在此时关闭。 任何人都知道如何解决此错误?请帮我。高级谢谢
java.lang.NoSuchMethodError: android.os.Binder#execTransact(int,int,int,int)#exact
at de.robv.android.xposed.XposedHelpers.findMethodExact(XposedHelpers.java:339)
at de.robv.android.xposed.XposedHelpers.findAndHookMethod(XposedHelpers.java:176)
at de.robv.android.xposed.XposedHelpers.findAndHookMethod(XposedHelpers.java:251)
at com.phoneinfo.changerpro.hooks.g.a(Unknown Source)
at com.phoneinfo.changerpro.hooks.MainHook.handleLoadPackage(Unknown Source)
at de.robv.android.xposed.IXposedHookLoadPackage$Wrapper.handleLoadPackage(IXposedHookLoadPackage.java:34)
at de.robv.android.xposed.callbacks.XC_LoadPackage.call(XC_LoadPackage.java:61)
at de.robv.android.xposed.callbacks.XCallback.callAll(XCallback.java:106)
at de.robv.android.xposed.XposedBridge$1.beforeHookedMethod(XposedBridge.java:234)
at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:1550)
at android.app.ActivityThread.handleBindApplication(<Xposed>)
at android.app.ActivityThread.access$1600(ActivityThread.java:154)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1378)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5296)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:707)
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:163)
我的代码:
public class DocterList extends Fragment {
private DatabaseReference dataref;
private RecyclerView recyclerView;
private List<Doc> result;
private DocViewHolder adapter;
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.activity_docter_list, container, false);
Firebase.setAndroidContext(getActivity());
dataref = FirebaseDatabase.getInstance().getReference().child("Docters");
result = new ArrayList<>();
recyclerView = (RecyclerView) v.findViewById(R.id.docter_list);
recyclerView.setHasFixedSize(true);
LinearLayoutManager llm = new LinearLayoutManager(getActivity());
llm.setOrientation(LinearLayoutManager.VERTICAL);
recyclerView.setLayoutManager(llm);
FirebaseRecyclerAdapter<Doc,DocViewHolder> adapter=new FirebaseRecyclerAdapter<Doc, DocViewHolder>(
Doc.class,
R.layout.view_docter,
DocViewHolder.class,
dataref
) {
@Override
protected void populateViewHolder(DocViewHolder viewHolder, Doc model, int position) {
viewHolder.setName(model.getName());
viewHolder.setCity(model.getCity());
}
};
recyclerView.setAdapter(adapter);
return v;
}
public static class DocViewHolder extends RecyclerView.ViewHolder{
TextView textName,textPlace;
public DocViewHolder(View itemView) {
super(itemView);
textName= (TextView) itemView.findViewById(R.id.t1);
textPlace= (TextView) itemView.findViewById(R.id.t2);
}
public void setName(String name) {
textName.setText(name);
}
public void setCity(String city) {
textPlace.setText(city);
}
}
}
模型文档类:
public class Doc {
String Name,City;
public Doc() {
}
public String getCity() {
return City;
}
public void setCity(String city) {
City = city;
}
public String getName() {
return Name;
}
public void setName(String name) {
Name = name;
}
public Doc(String name, String city) {
Name = name;
City = city;
}
}
答案 0 :(得分:0)
此堆栈是否来自您的个人测试设备或第三方用户?
我估计这是来自第三方用户,其设备为rooted且安装了Xposed Framework。
所述用户正在使用Xposed模块试图&#34; hook&#34;进入你的应用程序的函数调用 - 不幸的是由于他们的挂钩代码错误,应用程序崩溃了。
如果是,那么这不是您自己或您的应用程序的错误,也不能由您补救。
修复 - 如果您控制设备,您可以暂时禁用所有xposed模块(或者只是导致崩溃的一个特定模块 - com.phoneinfo.changerpr...
。)。 Unrooting可能无法修复它,您需要禁用Xposed模块(或整个Xposed框架。)。