Comments (10)
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.
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.
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.
Ok, things are working for me in Windows again. Sending a pull request.
from android-plugin.
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.
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.
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.
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.
still works on my box, merged your changes.
from android-plugin.
sweet works for me. thanks guys
from android-plugin.
Related Issues (20)
- Scala 2.10.0 sbtPlugin HOT 1
- github integration obsolete
- Consuming android library projects from local file system (rather than maven repository) HOT 1
- Proguard problem scala 2.10 HOT 1
- Working with an android scala project? HOT 3
- Problem hacking on the plugin HOT 6
- Test dependencies aren't included in output apks. HOT 1
- Native Libraries are not included HOT 7
- Running sbt 'gen-idea no-classifiers' produces errors HOT 3
- 0.7 SNAPSHOT, ProGuard: include native method names by default HOT 5
- unresolved dependencies after update to sbt 0.13
- Support for aapt --rename-manifest-package HOT 2
- Compiler warnings in TR.scala HOT 1
- 0.7.1-SNAPSHOT: invalid /system/etc/permissions/scala-library-2.10.1.xml
- aapt not found [cause bad path in plugin] HOT 1
- Excess write HOT 4
- Complicated use of macro packages with android-plugin
- Missing Android SDK should be warning, or checked only when really needed.
- System keyring integration for apk signing HOT 4
- Is this still in use/maintained? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-plugin.