-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems with lein-droid #840
Comments
OK I'll try to reproduce it to understand what's happening. |
So, you basically only need the android sdk. After installing you need to start the SDK Manager, and download some libraries and VM images. When starting it for the first time, the Manager suggest some packages to download. I recommend following that suggestion, with the exception of packages from Android M and Android 5.x, and download Android 4.4.2 (API19) instead . That is because by default lein-droid targets API19, so it is safer to use that Android version. Also make sure you download the "Android Support Library" and "Intel x86 Emulator Accelerator (HAXM Installer)". The latter you need to speed up your emulator (it will be used when you set the CPU of a virtual device to Intel Atom). You could also install the eclipse plugin (http://developer.android.com/sdk/installing/installing-adt.html), but it would help you only to start the package manager and emulator from eclipse menus. You can always use the command line tools for that. It's only a guess, but the problems could be caused by the fact that android libraries are packaged differently: aar instead of jar. |
It can be the packaging, but shouldn't lein-droid handle that? I don't think will |
Hi Andrea, I do not says I understand everything about it right now :-) Le jeudi 13 août 2015, Andrea Richiardi [email protected] a écrit :
Laurent Petit |
Yes, I agree 👓 I have worked with Android quite extensively with Android Studio and I was pondering about this issue. I don't know the inners of
Maybe one or the other can be the issue. In particular, after a quick |
ok, using the android sdk to download missing stuff right now. |
Maybe this is a better starting point |
Ah, it says JDK 1.7 exactly, but I have jdk 1.8 on my mac os x :-( 2015-08-13 16:11 GMT+02:00 Andrea Richiardi [email protected]:
Laurent Petit |
I can try here, now I am trying to debug the |
When executing
I am not behind a proxy, and I have only modified |
That is exactly what my fear was, it looks it is not looking into |
Should I launch the virtual device emulator via |
I think your error happens before, |
@arichiardi right now I'm all leiningen 2.5.1 from the command line, though, and it has been reported to work, what's happening then... ? |
Tried
|
ok, what's kind of weird is that the multidex not found issue happens with lein for me, and not during project creation, but when doing lein droid doall. So same error, but not same step, and not same tool |
Because |
Same error here:
Time to file a issue there on |
I do not have a
|
Yes, sure. Same error on different platforms. |
@laurentpetit After creating a new project with the lein-droid template, you need to change
in project.clj before running Also, when adding android libraries in
|
Will do |
Yes, sorry I forgot a step, you should download it (I think is called M2 repository or the like) through the SDK manager (either with Eclipse's or Android Studio's package manager). |
Mmm...checking the doc here it says that the |
I double checked, there's none |
I don't have Android Support Repository checked and installed. Maybe this is it |
Weird, I had |
Yeah, ok, so now I managed to get |
If you have the Eclipse plugin you have to create an instance of the emulator in the AVD manager... |
I'd like to go totally without eclipse right now, to better understand the moving parts.
|
maybe the best then would be to attach an Android device through USB. |
OK, I started |
Leave everything as default, mdpi for density, no sd card emulation, no keyboard...yeah it is messy a bit...that why I usually use Genymotion. But I guess for such a short test it is not worth installing it. |
ok. So I assume the |
Just take a Device Definition, create a new device from it (Device Definitions are templates). Important thing is that you set CPU to Intel, otherwise the emulator will run slow. On windows you also need to install HAXM, on Mac probably not. lein droid deploys automatically on the device if you have the emulator running. (it also works if you have a real device attached to USB, and have USB debugging enabled on the device). |
Ahh, I got the other way around. I will start from a Device Definition (which one do you suggest?). |
so there's no such thing as HAXM for OS X or Linux, it only exists as a Windows feature. Will have to find out how to disable it. |
HAXM is something you need to install separately (only on windows as far as I know). HAXM is only used to boost performance of the emulator, when CPU is set to Intel. If you don't have it, emulator will work, but reeeeeeeealy slow. |
Got it. Thanks. |
Almost there. lein-droid does not complain, the emulator is started, but I cannot see the app |
oh wait, it works! |
not even in the menu? |
Great ! I had to redo |
👍 ! |
ok, now same thing with lein commands from ccw |
OK, so all of the errors are present because CCW was not able to create the Leiningen Dependencies Classpath. Will look into that. But later, need to go now. CU. |
So I can reproduce that "Reset Project Configuration" does not work as expected. I don't have the dex not found error anymore in the console, but still, nothing happens. Looks like a very good candidate issue for freeing CCW from embedding leiningen-core. |
I second that! Go go go! 😄 |
The expected downside is that when doing a change to project.clj it will Le jeudi 13 août 2015, Andrea Richiardi [email protected] a écrit :
Laurent Petit |
So the first problem is also present with leiningen, if you try e.g. to call It seems like lein-droid does not, or cannot add the Dunno what I'll be able to do if even leiningen itself does not detect the classpath or the list of deps when asked to do so. |
Hi @roti can you go to lein-droid issue clojure-android/lein-droid#131 and mark your interest for its fix in the comments? I'll now work on the |
OK, so concerning |
Found the issue for |
Ooooh wow, good job! A lot of problem with this missed shutdown-agents right? I should keep it in the back of my mind... |
lein-droid 0.4.0 has been published by its author and it partially solves the classpath problem. Partially because now, CCW gets a classpath from lein, that's an improvement, but the classpath is still incomplete. |
Hi,
After creating a new project using the "droid" template (for android apps with lein-droid), the project has several errors, among which the most important one is:
To create a project using the droid template, in the "New clojure project" wizard, I entered following in the "Leiningen template" field:
droid com.myapp :target-sdk 19 :min-sdk 15
. After creating the project, one must also enter the path where android-sdk is installed in project.clj (in option :android :sdk-path). The errors persist event after setting the correct path.A second problem is that I can't run
lein droid doall
, from within ccw (using the shortcut Alt-L L). The execution hangs at some point, and never finishes. Running it from command line works fine.The text was updated successfully, but these errors were encountered: