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

拿到插件的dex #816

Closed
GitHubShy opened this issue Feb 18, 2022 · 2 comments
Closed

拿到插件的dex #816

GitHubShy opened this issue Feb 18, 2022 · 2 comments
Labels
因陈旧关闭 未解决但因长时间无人跟进而关闭

Comments

@GitHubShy
Copy link

插件项目有个功能是获取自己的dex文件来拿到所有的类
DexFile df = new DexFile(context.getPackageCodePath());
但是现在插件化以后,这里获得的是宿主的dex。
我现在把context.getPackageCodePath()改成宿主的解压目录,比如UnpackedPlugin/sample-manager/oDex/C0750B63-4562-4ED2-8E99-2B6CAFD9B08F_odex
但总是报错

No original dex files found for dex location

请问获取的正确姿势应该是啥

@shifujun
Copy link
Collaborator

我测了一下getPackageCodePath正常返回的也是/data/app/com.tencent.shadow.test.hostapp-DT_iCRA93sp55v2z_5QOdQ==/base.apk,是apk路径,不是dex路径。

所以#818 返回的也是插件apk的路径。

@GitHubShy
Copy link
Author

我测了一下getPackageCodePath正常返回的也是/data/app/com.tencent.shadow.test.hostapp-DT_iCRA93sp55v2z_5QOdQ==/base.apk,是apk路径,不是dex路径。

所以#818 返回的也是插件apk的路径。

可以了~还有那个 我在#811 提到那个sdk webview的issue算是个bug不

@shifujun shifujun added the 因陈旧关闭 未解决但因长时间无人跟进而关闭 label Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
因陈旧关闭 未解决但因长时间无人跟进而关闭
Projects
None yet
Development

No branches or pull requests

2 participants