jberkel / android-plugin

An sbt plugin for Android development in Scala
https://groups.google.com/forum/#!forum/scala-on-android
Other
476 stars 113 forks source link

[fix] Emulator preloading, added library version #166

Closed fxthomas closed 11 years ago

fxthomas commented 11 years ago

This is a fix for emulator preloading, now works without any issue, at least on my side :

> sbt
Loading project definition from /Users/fx/Documents/Projects/Lunar/project
[info] Set current project to Lunar (in build file:/Users/fx/Documents/Projects/Lunar/)

> android:preload-emulator Galaxy_Nexus_HAXM
[info] Starting emulator with read-write system
[info] This may take a while...
Warning: No DNS servers found
HAX is working and emulator runs in fast virt mode
[info] Installing scala-library.2.10.0.jar
[info] Setting permissions for scala-library.2.10.0.jar
[success] Total time: 31 s, completed Mar 15, 2013 10:52:20 PM

> android:emulator-start Galaxy_Nexus_HAXM
[success] Total time: 0 s, completed Mar 15, 2013 10:52:31 PM

> android:start-emulator
[info] Wrote /Users/fx/Documents/Projects/Lunar/target/scala-2.10/src_managed/main/scala/com/github/fxthomas/lunar/TR.scala
[info] Skipping Proguard
[info] Packaging /Users/fx/Documents/Projects/Lunar/target/lunar-0.1.apk
[success] Total time: 4 s, completed Mar 15, 2013 10:53:35 PM
appamatto commented 11 years ago

Really awesome work. I did notice some problems when I already had the emulator open, but otherwise it worked perfectly!

Also, I made a patch to standardize the file and permission names to a format like "scala-library-2.10.0.jar". That seems less confusing for users who otherwise would need to cat the permissions xml file to get the permission name.

appamatto commented 11 years ago

Forgot to note that this has been merged. Thanks!

fxthomas commented 11 years ago

Excellent! Glad it worked!

By the way, if the emulator is already started, the command kills it by default. I'm not sure whether this is required, but there will probably be conflicts between the read-only and the read-write emulators if I don't do that, so...