-1

Maybe I'm trying to go pure function functional, but I'm finding that adding scalaz 2.11-7.1.1 to my android application on scala 2.11 causes compile time errors. At first, when I building the project, everything is compiled successfully. When I export the package to Android, I then get compile time errors like "object IO is not a member of package scalaz.effect. Note: class IO exists but it has no companion object". The eclipse IDE autocompletes the scalaz.effect.IO object, just when packaging and installing to an emulator do I get an issue.

Here's an example of code where Eclipse + the Android Proguard Scala plugin shows an error

def updateCredentials(response: AccountAuthenticatorResponse, 
    account: Account, 
    authTokenType: String,
    options: Bundle): Bundle = scalaz.effect.IO({Log.v(OutlookAuthenticator.TAG,  "updateCredentials()")}).map(_ => null).unsafePerformIO

Is eclipse just not getting RAM? Is the scalaz package not possible to dex ? Maybe I should give up trying to integrate?

Here's my eclipse.ini file

-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20140116-2212
--launcher.XXMaxPermSize
256m
-vmargs
-Xmx1048m
-Xms512m
-XX:MaxPermSize=512m
DetriusXii
  • 37
  • 7
  • What is in your proguard config? – drstevens Nov 22 '14 at 18:31
  • I was seeing "Could not dex" errors when including only scalaz_core. I think it's because of the calls to IO stuff (even in scalaz_core in the call to scala.xml libraries) that are ultimately in things available to the JVM but not necessarily in Dalvik. I'm going to close the ticket. I'll just write the monads myself if I need them. – DetriusXii Nov 23 '14 at 18:23

1 Answers1

-1

I'm going to close the question as I think it's because scalaz has occasional references to IO packages in scala that wouldn't necessary be on Android.

DetriusXii
  • 37
  • 7