Git Product home page Git Product logo

Comments (10)

miaubiz avatar miaubiz commented on July 21, 2024

the dx command is dx.bat and cannot be executed without the extension. the other fiels are either .exe or .bat

[error] Error running dx: java.io.IOException: Cannot run program "c:\android-sd
k-windows\platforms\android-2.0\tools\dx": CreateProcess error=2, The system can
not find the file specified

with http://github.com/timgilbert/android-plugin the batch files work ok but the exes still fail for me.

[error] Error running package-debug: java.io.IOException: Cannot run program "c:
\android-sdk-windows\tools\apkbuilder": CreateProcess error=2, The system cannot
find the file specified

hardcoding the extensions, .bat or .exe to defaultDxName etc. makes it work.

(windows xp sp3, java 1.6.0_17, scala 2.7.7, sbt 0.5.6)

from android-plugin.

timgilbert avatar timgilbert commented on July 21, 2024

I'm actually still seeing an error with my forked copy, running versus SDK 4, android version 1.5. dx runs OK, but it quits with an error (possibly the command-line switches have changed between android versions)?

The command it's running is:

C:\dev\android\android-sdk-windows\platforms\android-1.5\tools\dx.bat -JXmx512M --dex --output=C:\Projects\etc\axr\target\classes.dex C:\Projects\etc\axr\target\classes.min.jar

...which gives me the error "error: no command specified" and a usage statement.

usage:
  dx --dex [--debug] [--verbose] [--positions=<style>] [--no-locals]
  [--no-optimize] [--statistics] [--[no-]optimize-list=<file>] [--no-strict]
  [--keep-classes] [--output=<file>] [--dump-to=<file>] [--dump-width=<n>]
  [--dump-method=<name>[*]] [--verbose-dump] [--no-files] [--core-library]
  [<file>.class | <file>.{zip,jar,apk} | <directory>] ...

The command-line seems to be correct, I'm not certain why it's complaining.

EDIT: aha. The problem seems to be that the flag -JXmx512M is coming before the --dex command. If I take that away the command-line runs OK. I'll experiment with this a bit on my fork.

from android-plugin.

timgilbert avatar timgilbert commented on July 21, 2024

After some poking around, I've got this working on Win32. I can't do a push from this network but will do one later this evening. All the commands seem to be being run correctly, but I'm getting an error "device not found" on the call to adb -e install at the end. I'm assuming that's my local setup, however.

from android-plugin.

timgilbert avatar timgilbert commented on July 21, 2024

Ok, things are working for me in Windows again. Sending a pull request.

from android-plugin.

jberkel avatar jberkel commented on July 21, 2024

hi tim, the Xmx512M is really needed, otherwise dx will run out of memory (at least when trying building bigger projects). this was definitely the case with sdk 1.5, not sure about 1.6. can you see if you can put it back in again?

from android-plugin.

timgilbert avatar timgilbert commented on July 21, 2024

Hi Jan... Sure, I'll mess with it some locally and get back to you. I'm guessing there's just something about the order of arguments on Windows that's more fragile than on unix-based OSes.

[Sorry if you get this twice, Chrome doesn't seem to always like github.]

from android-plugin.

timgilbert avatar timgilbert commented on July 21, 2024

Unfortunately it doesn't look like there is a current fix for this - it's actually logged already as android issue 4217.

The good news is that somebody at Google stated it was fixed in an upcoming version (and indeed the .bat file attached to that ticket is better in this regard), so maybe in Android 2.1 or something this will be fixed.

The bad news is that it won't currently work. I can just mess with the plugin on my fork so that it only omits the flag on Windows for now. So far I seem to be the only person masochistic enough to develop with these tools on Windows anyways, and my own projects aren't large yet. ;)

from android-plugin.

timgilbert avatar timgilbert commented on July 21, 2024

Ok, I've verified that my latest commit - 61ff866 - works on Windows and should preserve the -JXmx values for non-windows platforms (I also made the exact parameter overrideable). Can you check it out on a non-windows OS when you get a chance?

from android-plugin.

jberkel avatar jberkel commented on July 21, 2024

still works on my box, merged your changes.

from android-plugin.

miaubiz avatar miaubiz commented on July 21, 2024

sweet works for me. thanks guys

from android-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.