Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hook Toast的makeText 方法总是闪退,下面是源码,这可能不是我的问题 #37

Closed
ws15621066586 opened this issue Aug 19, 2017 · 3 comments

Comments

@ws15621066586
Copy link

public static String className = "android.widget.Toast";
public static String methodName = "makeText";
public static String methodSig = "(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;";
public static Toast hook(Context a, CharSequence b, int c) {
    Toast toast=origin(a,b,c);
  // Toast.makeText(a,"00000000000000000",Toast.LENGTH_SHORT).show();
    return toast ;
}
public static Toast origin(Context a, CharSequence b, int c) {
    Log.d("dddd","ddddd");
    return null;
}
@ws15621066586
Copy link
Author

这么写,别的APK一有Toast就闪退,代码看不出有什么问题,麻烦作者看下,如果代码没有问题建议写个程序测试下

rk700 added a commit that referenced this issue Aug 21, 2017
@rk700
Copy link
Member

rk700 commented Aug 21, 2017

fca5dcb

@ws15621066586
Copy link
Author

可以了,,!!

@rk700 rk700 closed this as completed Aug 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants