AndFix 0.50 6.0 IllegalAccessError

rvpgvaaj  于 5个月前  发布在  其他
关注(0)|答案(3)|浏览(74)

按照教程一步一步来的,中间并没有出问题,除了最后是使用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)

s4n0splo

s4n0splo1#

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"

fcy6dtqo

fcy6dtqo2#

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

vwkv1x7d

vwkv1x7d3#

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 自己编译,也出现这样的问题,请问你的问题解决没有

相关问题