什么jar/dex文件提供了Android.jar的真正实现
编译 Android SDK 源代码后,我遇到了一些有趣的问题。我 尝试反汇编生成的android.jar,但发现大多数 该 jar 文件中包含的方法只是一个不执行任何操作的存根 不仅仅是抛出运行时异常,例如:
public void startActivityForResult(android.content.Intent, int);
Code:
0: new #2; //class java/lang/RuntimeException
3: dup
4: ldc #3; //String Stub!
6: invokespecial #4; //Method java/lang/
RuntimeException."<init>":(Ljava/lang/String;)V
9: athrow
我可以理解 Android.jar 可能不需要包含 Android 框架的真正实现,因为它仅充当 第三方应用程序的编译时库。但我的问题是:什么是 提供 android.jar 真正实现的 Jar 或 Dex 文件?我 假设它也应该在编译 SDK 时生成,对吗?
谢谢! 二
I ran into some interesting problem after compiling the Android SDK source. I
tried to disassemble the resulting android.jar, but found that most
methods contained in that jar file are just a stub that does nothing
more than throwing a runtime exception, for example:
public void startActivityForResult(android.content.Intent, int);
Code:
0: new #2; //class java/lang/RuntimeException
3: dup
4: ldc #3; //String Stub!
6: invokespecial #4; //Method java/lang/
RuntimeException."<init>":(Ljava/lang/String;)V
9: athrow
I can understand there might be no need for Android.jar to contain the
real implementations of Android Framework, given it only serves as a
compile-time library for 3rd party apps. But my question is: what is
the Jar or Dex file(s) that provides the real implementation of android.jar? I
assume it should also be generated when compiling the SDK, am I right?
Thanks!
LL
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论