Android dx tool

后端 未结 3 1076
小鲜肉
小鲜肉 2020-12-14 01:55

Does anyone know of any documentation for dx?

In particular I am interested in knowing what the --core-library option does.

Can anybody shed a

3条回答
  •  春和景丽
    2020-12-14 02:36

    What is dx tool?

    The dx tool converts Java class files into a .dex (Dalvik Executable) file

    Where is it?

    The dx.jar was original located under android-sdk/platforms/android-X/tools/lib/ before (especially in android-3 and android-4), and moved to android-sdk/platform-tools/lib/ later.

    How does it fit in Android?

    The Java source files are converted to Java class files by the Java compiler.

    The dx tool converts Java class files into a .dex (Dalvik Executable) file. All class files of the application are placed in this .dex file. During this conversion process redundant information in the class files are optimized in the .dex file.

    For example, if the same String is found in different class files, the .dex file contains only one reference of this String.

    These .dex files are therefore much smaller in size than the corresponding class files.

    The .dex file and the resources of an Android project, e.g., the images and XML files, are packed into an .apk (Android Package) file.

    To understand better look at the android build process

    build process

    FYI:

    The program aapt (Android Asset Packaging Tool) performs apk creation. The resulting .apk file contains all necessary data to run the Android application and can be deployed to an Android device via the adb(android device bridge) tool.

    Reference

提交回复
热议问题