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

0.50 6.0 IllegalAccessError #361

Open
1037328868 opened this issue Jan 18, 2018 · 3 comments
Open

0.50 6.0 IllegalAccessError #361

1037328868 opened this issue Jan 18, 2018 · 3 comments

Comments

@1037328868
Copy link

1037328868 commented Jan 18, 2018

按照教程一步一步来的,中间并没有出问题,除了最后是使用adb push out.apatch的

java.lang.IllegalAccessError: Method 'void android.support.v7.app.AppCompatActivity.onCreate(android.os.Bundle)' is inaccessible to class 'njy.lsh.cc.testhotfix2.MainActivity_CF' (declaration of 'njy.lsh.cc.testhotfix2.MainActivity_CF' appears in /data/user/0/njy.lsh.cc.testhotfix2/files/apatch/lsh.apatch)
at njy.lsh.cc.testhotfix2.MainActivity_CF.onCreate(MainActivity.java:12)
at android.app.Activity.performCreate(Activity.java:6301)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1113)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2530)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2665)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1499)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:207)
at android.app.ActivityThread.main(ActivityThread.java:5765)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)

@1037328868
Copy link
Author

1037328868 commented Jan 18, 2018

application中:

try {

        PatchManager patchManager = new PatchManager(this);
    
        patchManager.init(getPackageManager().getPackageInfo(getPackageName(), 0).versionName);
        
        patchManager.loadPatch();
        
        Log.e("getPatchPath", getPatchPath());
        patchManager.addPatch(getPatchPath());
    } catch (Exception e) {
        e.printStackTrace();
    }

路径Environment.getExternalStorageDirectory().getAbsolutePath() +"/lsh.apatch"

@HuskarHuang
Copy link

你好,我下载andfix 自动编译,也出现这样的问题,请问你的问题解决没有

@HuskarHuang
Copy link

application中:

try {

        PatchManager patchManager = new PatchManager(this);
    
        patchManager.init(getPackageManager().getPackageInfo(getPackageName(), 0).versionName);
        
        patchManager.loadPatch();
        
        Log.e("getPatchPath", getPatchPath());
        patchManager.addPatch(getPatchPath());
    } catch (Exception e) {
        e.printStackTrace();
    }

路径Environment.getExternalStorageDirectory().getAbsolutePath() +"/lsh.apatch"
你好,我下载andfix 自己编译,也出现这样的问题,请问你的问题解决没有

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