Created
September 27, 2021 11:04
-
-
Save winterliu1020/aefa430e8b39f0285e3ed99890778320 to your computer and use it in GitHub Desktop.
Android dynamic load dex.jar
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
android 动态加载、执行的一些命令 | |
java --> class --> dex 然后动态加载执行 | |
Android studio执行build命令,在build目录下javac目录找到生成的class文件 | |
可选操作:把class文件解压,把里面的mainActivity.class删掉,用jar -cfm test2.jar META-INF/MANIFEST.MF ./*.class 重新打包成class.jar文件 | |
然后把class.jar复制到~/Library/Android/sdk/build-tools/27.0.3目录,执行:dx --dex --no-strict --output=test2_dex.jar class.jar,就会在同目录下生成对应的dex.jar文件 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment