首页 > android > 德兴手动为Netbeans项目

德兴手动为Netbeans项目 (Dexing manually for Netbeans project)

问题

我有一个NB7 Android项目。不幸的是,Pre-dexing因堆内存不足而停止运行。有没有办法从Android SDK R21的命令行手动运行Pre-dexing以更好地控制内存分配?

解决方法

我对netbeans一无所知或者如何控制它的预先行为,但是从命令行在jar上运行dx是一件简单的事情。

 dx --dex --output=classes.dex blah.jar

或者,因为您需要控制内存选项

 dx -JXmx1G --dex --output=classes.dex blah.jar

你可以找到dx at <android-sdk>/platform-tools/dx

在较新版本的sdk上,您可以找到dx at

<android-sdk>/build-tools/android-<ver>/

问题

I have a NB7 Android project. Unfortunally Pre-dexing stops with heap out of memory. Is there a way to run Pre-dexing manually from command-line for Android SDK R21 to control memory assignment better ?

解决方法

I don't know anything about netbeans or how to control its predexing behavior, but it's a simple matter to run dx on a jar from the command line

 dx --dex --output=classes.dex blah.jar

Or, since you need to control the memory options

 dx -JXmx1G --dex --output=classes.dex blah.jar

You can find dx at <android-sdk>/platform-tools/dx

On the newer versions of sdk , you can find dx at

<android-sdk>/build-tools/android-<ver>/
相似信息