如何以及如何将Java字节码转换为Android dex文件? [英] How and what converts the Java bytecode to Android dex files?

查看:260
本文介绍了如何以及如何将Java字节码转换为Android dex文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何以及如何将Java字节码准确转换为Android中的dex文件?

How and what exactly converts the java byte-code to dex file in Android ?

我知道,Android用户为保护他们免于许可问题所做的唯一努力

I know that the only part Android people have done to save them from licensing issues, making the system fast for execution, low memory need and other more features as it is register based VM.

但是,我能说出什么名字呢?

But what name I can tell to the part it doing so?

推荐答案

浏览以下网址并阅读所有详细信息
详细URL

Go through bellow url and read all details Detail URL

典型构建的一般过程概述如下:

The general process for a typical build is outlined below:


  1. Android Asset Packaging Tool(aapt)会获取您的应用程序资源文件,例如AndroidManifest.xml文件和Activity的XML文件,并对其进行编译。还会生成一个R.java,因此您可以从Java代码中引用资源。

  1. The Android Asset Packaging Tool (aapt) takes your application resource files, such as the AndroidManifest.xml file and the XML files for your Activities, and compiles them. An R.java is also produced so you can reference your resources from your Java code.

aidl工具将您拥有的所有.aidl接口转换为Java接口。

The aidl tool converts any .aidl interfaces that you have into Java interfaces.

所有Java代码(包括R.java和.aidl文件)都是由Java编译器编译的
,而.class文件是输出。

All of your Java code, including the R.java and .aidl files, are compiled by the Java compiler and .class files are output.

dex工具将.class文件转换为Dalvik字节码。项目中包含的所有第3方库和.class文件也都将转换为.dex文件,以便可以将它们打包到最终的.apk文件中。

The dex tool converts the .class files to Dalvik byte code. Any 3rd party libraries and .class files that you have included in your project are also converted into .dex files so that they can be packaged into the final .apk file.

所有未编译的资源(例如图像),已编译的资源以及.dex文件的
均被发送到apkbuilder工具,以打包为.apk文件的

All non-compiled resources (such as images), compiled resources, and the .dex files are sent to the apkbuilder tool to be packaged into an .apk file.

这篇关于如何以及如何将Java字节码转换为Android dex文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆