摇篮执行DEX错误命令行太长 [英] Gradle executing dex Error command line too long

查看:1342
本文介绍了摇篮执行DEX错误命令行太长的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要建一个Android应用程序在Windows上使用摇篮,当它涉及到最后一个模块,我面临着以下错误:

I'm building an Android app on windows using gradle and when it comes to last module I'm facing the following error :

* What went wrong:
Execution failed for task ':client:test:dexApiPhoneDebug'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
        C:\adt-bundle-windows\sdk\build-tools\19.1.0\dx.bat --dex --num-threads= 
.....
Error Code:
    1
Output:
        The command line is too long.

我使用的命令行来构建。我知道,类似的问题,如果可以使用Maven通过映射你的项目,以磁盘代号为这里所描述的解决:<一href="http://stackoverflow.com/questions/8181098/the-command-line-is-too-long-in-java-project-with-maven">The命令行太长。在Java项目中使用Maven

你有任何想法如何解决使用摇篮这个问题?

Do you have any idea how can I solve that issue using Gradle?

推荐答案

我想出了一个解决办法,它并不完美,但至少做的工作。

I figured out a workaround, it's not perfect but at least do the job.

基本上,这个项目我是想了很久目录下: C:\开发\云\ my.cloud \主\ myCompany中\机器人

Basically the project I had was under a long directory like : C:\Development\cloud\my.cloud\main\mycompany\android.

因此​​,作为一种解决方法我映射该文件夹的网络位置,你可以通过使用SUBST MS-DOS命令或在浏览器在计算机使用GUI映射网络驱动器。 其实我映射到一个字母Z:并从那里运行我的摇篮命令和它的工作就像一个魅力

So as a workaround I mapped this folder to a network location, you can do that by using SUBST MS-DOS command or in Explorer under your computer use the GUI "Map a Network Drive". Actually I mapped it to a letter Z: and run my gradle command from there and it worked like a charm.

就像我说的它并不完美,但至少让我继续前进。

As I said it's not perfect but at least allowed me to move forward.

这篇关于摇篮执行DEX错误命令行太长的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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