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

patch失败啊 #53

Closed
zhuozp opened this issue Mar 29, 2017 · 3 comments
Closed

patch失败啊 #53

zhuozp opened this issue Mar 29, 2017 · 3 comments

Comments

@zhuozp
Copy link

zhuozp commented Mar 29, 2017

/com.meituan.robust.sample E/robust: PatchsInfoImpl failed,cause ofjava.lang.ClassNotFoundException: Didn't find class "com.meituan.robust.patch.PatchesInfoImpl" on path: DexPathList[[zip file "/storage/emulated/0/robust/patch_temp.jar"],nativeLibraryDirectories=[/vendor/lib64, /system/lib64]]

报这样的错误啊,在patch的时候,用的是sample例子,然后不管是debug还是release,都提示这个。可以确定得是patch.jar包中是存在com.meituan.robust.patch.PatchesInfoImpl这个的。这个jar文件也是可以确定放到正确路径下的,我是一步一步调试的,到patchsInfoClass = classLoader.loadClass(patch.getPatchesInfoImplClassFullName());这一句就抛异常了。你们在弄自己的工程时,难道没有出息类似的情况吗?

@zhuozp
Copy link
Author

zhuozp commented Mar 29, 2017

另外这句指的是什么?是因为生成的jar文件有问题吗?
Suppressed: java.io.IOException: No original dex files found for dex location /storage/emulated/0/robust/patch_temp.jar

@zhuozp
Copy link
Author

zhuozp commented Mar 29, 2017

找到问题所在了,主要是target版本的问题,按照sample来操作是不存在问题的。但是sample里面的gradle配置文件要做相应的调整,targetversion改为23或者23以下,或者不改动的话,相应的添加runtime权限。参考这个 http://stackoverflow.com/questions/36565032/android-dexclassloader-classnotfound-exception

@zhuozp zhuozp closed this as completed Mar 29, 2017
@mivanzhang
Copy link
Member

非常感谢您的建议

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