Android是什么pre-德兴以及如何将它提高性能? [英] What is Android Pre-Dexing and how to does it increase performance?

查看:175
本文介绍了Android是什么pre-德兴以及如何将它提高性能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看的Andr​​oid蚂蚁脚本有消息认为它是pre-德兴。然而DEX和pre-DEX使用相同的选项,但在一个情况下,一个罐子的时间,在其他情况下,多个罐子的时间。

什么是真正需要的?是pre-DEX强制性的?

例如

 周围的可执行文件和参数是'字符
不属于命令。
      [DEX] pre-德兴F:\用户\ tejasoft \工作\ FND \ CMN \ TOOLS \社会\深圳\演示\库\ PINIT-SDK-1.0.jar  - > PINIT-SDK-1.0-e3bebafa2727504605edf3d8d85b5d46.jar
       [DX]当前操作系统是Windows 7
       [DX]执行D:\ APPS \ java的\ EMBD \ CMN \机器人\的OEM \谷歌\ ADT \ 4.x版\版本4.3.x \ 4.3 \ SDK \集结工具\ 18.1.0 \ dx.bat'带参数:
       [DX]--dex
       [DX] - 输出
       [DX] 'F:\users\tejasoft\work\fnd\cmn\tools\social\sz\demo\bin\dexedLibs\pinit-sdk-1.0-e3bebafa2727504605edf3d8d85b5d46.jar'
       [DX]F:\用户\ tejasoft \工作\ FND \ CMN \ TOOLS \社会\深圳\演示\库\ PINIT-SDK-1.0.jar
       [DX]
       [DX]在字符周围的可执行文件和参数是
       [DX]不属于命令。
执行:Java13CommandLauncher:执行D:\ APPS \ java的\ EMBD \ CMN \机器人\的OEM \谷歌\ ADT \ 4.x版\版本4.3.x \ 4.3 \ SDK \集结工具\ 18.1.0 \ dx.bat'与参数:
--dex
--output
'F:\users\tejasoft\work\fnd\cmn\tools\social\sz\demo\bin\dexedLibs\pinit-sdk-1.0-e3bebafa2727504605edf3d8d85b5d46.jar'
F:\用户\ tejasoft \工作\ FND \ CMN \工具\社会\深圳\演示\库\ PINIT-SDK-1.0.jar

周围的可执行文件和参数的字符
不属于命令。
      [DEX]编译的文件和外部的库转换为F:\用户\ tejasoft \工作\ FND \ CMN \ TOOLS \社会\深圳\演示\ BIN \ classes.dex ...
       [DX]当前操作系统是Windows 7
       [DX]执行D:\ APPS \ java的\ EMBD \ CMN \机器人\的OEM \谷歌\ ADT \ 4.x版\版本4.3.x \ 4.3 \ SDK \集结工具\ 18.1.0 \ dx.bat'带参数:
       [DX]--dex
       [DX] - 输出
       [DX]F:\用户\ tejasoft \工作\ FND \ CMN \ TOOLS \社会\深圳\演示\ BIN \ classes.dex
       [DX]F:\用户\ tejasoft \工作\ FND \ CMN \ TOOLS \社会\深圳\演示\ BIN \班
       [DX] 'F:\users\tejasoft\work\fnd\cmn\tools\social\sz\demo\bin\dexedLibs\classes-144740ee5cf8b90b747300d19fb8201e.jar'
       [DX] 'F:\users\tejasoft\work\fnd\cmn\tools\social\sz\demo\bin\dexedLibs\classes-1593da1bb60c5ec741aca494963e04a3.jar'
       [DX] 'F:\users\tejasoft\work\fnd\cmn\tools\social\sz\demo\bin\dexedLibs\classes-37bb5269e4fbd6dda9900fea95c0c29b.jar'
 

解决方案

重要的是要记住,你是工作在Java中,这是不完全一样的东西在Dalvik运行时这种情况下是非常有用的。 Java中,从甲骨文,采用的是完全不同的虚拟机,而Dalvik的是专门微调的移动设备。

在DEX流程把你的Java编译的JAR文件,并将它们转换成Dalvik的可执行文件(.dex)的文件,将运行在Android上。 Oracle的JVM使用不同的字节code比Dalvik的运行,使得这一步是必要的。

有图书馆一个过程中,你可能已经包含在你的项目中,因为他们也有一个标准的Java编译器编译,然后另一个进程为你的实际项目。

它分两步作为最终的过程中,你的应用程序来完成,需要访问已经dexed库文件,以避免引用$ ​​C $ c修改,而这个过程是繁忙的。

您可以找到更多的<一个href="http://source.android.com/devices/tech/dalvik/index.html">http://source.android.com/devices/tech/dalvik/index.html - 在这里,你也将看到的Dalvik计划更换有一种叫艺术。

I see ant script of Android has message that it is "pre-dexing". However dex and pre-dex uses same options, except that in one case one jar at a time, in other case multiple jars at a time.

What is the real need? Is pre-dex mandatory?

e.g

The ' characters around the executable and arguments are
not part of the command.
      [dex] Pre-Dexing F:\users\tejasoft\work\fnd\cmn\tools\social\sz\demo\libs\pinit-sdk-1.0.jar -> pinit-sdk-1.0-e3bebafa2727504605edf3d8d85b5d46.jar
       [dx] Current OS is Windows 7
       [dx] Executing 'D:\Apps\java\embd\cmn\android\oems\google\adt\4.x\4.3.x\4.3\sdk\build-tools\18.1.0\dx.bat' with arguments:
       [dx] '--dex'
       [dx] '--output'
       [dx] 'F:\users\tejasoft\work\fnd\cmn\tools\social\sz\demo\bin\dexedLibs\pinit-sdk-1.0-e3bebafa2727504605edf3d8d85b5d46.jar'
       [dx] 'F:\users\tejasoft\work\fnd\cmn\tools\social\sz\demo\libs\pinit-sdk-1.0.jar'
       [dx] 
       [dx] The ' characters around the executable and arguments are
       [dx] not part of the command.
Execute:Java13CommandLauncher: Executing 'D:\Apps\java\embd\cmn\android\oems\google\adt\4.x\4.3.x\4.3\sdk\build-tools\18.1.0\dx.bat' with arguments:
'--dex'
'--output'
'F:\users\tejasoft\work\fnd\cmn\tools\social\sz\demo\bin\dexedLibs\pinit-sdk-1.0-e3bebafa2727504605edf3d8d85b5d46.jar'
'F:\users\tejasoft\work\fnd\cmn\tools\social\sz\demo\libs\pinit-sdk-1.0.jar'

The ' characters around the executable and arguments are
not part of the command.
      [dex] Converting compiled files and external libraries into F:\users\tejasoft\work\fnd\cmn\tools\social\sz\demo\bin\classes.dex...
       [dx] Current OS is Windows 7
       [dx] Executing 'D:\Apps\java\embd\cmn\android\oems\google\adt\4.x\4.3.x\4.3\sdk\build-tools\18.1.0\dx.bat' with arguments:
       [dx] '--dex'
       [dx] '--output'
       [dx] 'F:\users\tejasoft\work\fnd\cmn\tools\social\sz\demo\bin\classes.dex'
       [dx] 'F:\users\tejasoft\work\fnd\cmn\tools\social\sz\demo\bin\classes'
       [dx] 'F:\users\tejasoft\work\fnd\cmn\tools\social\sz\demo\bin\dexedLibs\classes-144740ee5cf8b90b747300d19fb8201e.jar'
       [dx] 'F:\users\tejasoft\work\fnd\cmn\tools\social\sz\demo\bin\dexedLibs\classes-1593da1bb60c5ec741aca494963e04a3.jar'
       [dx] 'F:\users\tejasoft\work\fnd\cmn\tools\social\sz\demo\bin\dexedLibs\classes-37bb5269e4fbd6dda9900fea95c0c29b.jar'

解决方案

It's useful to remember in this case that you are working in Java, which is not exactly the same thing as the Dalvik runtime. Java, from Oracle, uses a completely different virtual machine, while Dalvik is specifically fine-tuned for mobile devices.

The DEX processes take your Java compiled JAR files and converts them into Dalvik Executable Files (.dex) files that will run on Android. The Oracle JVM uses different bytecode than the Dalvik runtime, making this step a necessity.

There is a process for libraries you might have included in your project, as they are also compiled with a standard Java compiler, and then another process for your actual project.

It's done in two steps as the final process, your application, requires access to already dexed library files to avoid having references to code change while the process is busy.

You can find out more at http://source.android.com/devices/tech/dalvik/index.html - where you will also see that Dalvik is scheduled for replacement with something called ART.

这篇关于Android是什么pre-德兴以及如何将它提高性能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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