Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Ondra Pelech
@sideeffffect
Travis CI is now green :tada: !!!
Yan Doroshenko
@YanDoroshenko
Hey guys. Can someone please help me? I'm trying to use sbt-android plugin with SBT 1.3.3 and it can't find the plugin
soc
@soc
@YanDoroshenko there is no support for SBT 1.x. you need to use SBT 0.13.
fiatjaf
@fiatjaf
what do I do if I hit an [error] java.lang.IllegalArgumentException: Could not determine java version from '11.0.5'.
I'm trying to migrate from android-studio/gradle
Roberto Leibman
@rleibman
hi! Starting a new android project (actually, it'll be part of a larger project written in akka on the server, scalajs on the client and I need an android portion as well) . So what's the status of scala on android? 6 years ago I was able to use scala successfully on android, but I imagine time has changed, and it doesn't seem like the community is very active on android. Where are we? What's the toolchain? which versions of sbt/scala/java should I use?
Roberto Leibman
@rleibman
... crickets
Omid Barat
@obarat
chirp chirp
Perry
@pfn
@fiatjaf hrm, java 11 isn't supported probably -- dunno if that's something fixable; I haven't been maintaining
@rleibman the community (here) is not active, obviously :(
Roberto Leibman
@rleibman
So nobody is building android applications with scala then?
Perry
@pfn
I haven't been tracking to see
Roberto Leibman
@rleibman
Any recommendations for what to use instead? give up and use kotlin?
Though that won't address ios.
Gregg Hernandez
@gregghz
IMO without sbt 1.x support and scala not really supporting android as a target (only really supports jvm, native, and js), building android projects with scala is an uphill battle. It's a lot of fun, but it comes with a lot of downsides. It also makes it harder to attract experienced android developers.
Roberto Leibman
@rleibman
True. I'm really looking forward to seeing what comes out of this group
Though it's been 6+ months and I haven't heard a peep, I tried contacting the presenter on linkedin for info and haven't received an answer.
I'm already doing a lot of work with scalajs and react, so taking the next step and using react native sounds like a solid plan.
Perry
@pfn
interesting
Perry
@pfn
oh, but react native, meh
Roberto Leibman
@rleibman
Why the problem? you're coding scala, and react isn't that ugly.
Gregg Hernandez
@gregghz
just another layer on top of the jvm. With react native, the jvm is running a webview and the webview is running your code. Scala already targets the jvm, with react native you have to target js (scalajs). Which works just fine, but feels like extra layers when scala is already a JVM language. You also only really get access to APIs that react-native exposes and not the actually native java APIs from scala code. Writing scala targeting the jvm gives you full access to all android APIs.
Perry
@pfn
yeah, too many layers of abstraction when it should work natively
kamilwojdylo
@kamilwojdylo
Hello everyone, it's my first time with Scala on Android I would like to ask you can I use latest version of Scala, sbt and android build tools or do they have to be specific versions mentioned on https://scala-android.org/quickstart/ ? I can see that the latest release was on 24th of February 2017 which is a long time ago is this project maintained and keept updated to never Android versions?
Gregg Hernandez
@gregghz
sbt 0.13.x and scala 2.11 are required i believe.
Anton Kumaigorodski
@btcontract
hey, currently trying to migrate my project, following quickstart section gives me java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema once I type gen-android com.mypackage.test test, it does manage to create a project structure despite this but then running android:run gives [error] No such setting/task. Any hint on how to fix this?
kamilwojdylo
@kamilwojdylo
@btcontract I had similar poblems to fix then I had to install sbt version 0.13.x and Java from Oracle not OpenJDK
Anton Kumaigorodski
@btcontract
@kamilwojdylo sadly that did not help
exactly the same error
Perry
@pfn
@btcontract sounds like you need to make sure you're on scala 2.11 as well
also java8 or java9
Chenai Nakam
@chenakam
How to config lintOptions?
Chenai Nakam
@chenakam

When i use

"androidx.work" % "work-runtime" % "2.2.0"

cause an error:

Error: Invalid instruction 'targetApi', valid instructions are : REMOVE,REPLACE,STRICT
Chenai Nakam
@chenakam
How to config
android.useAndroidX=true
android.enableJetifier=true
Chenai Nakam
@chenakam
Did you upgrade it to com.android.tools.build:gradle:3.2.1? @pfn
Perry
@pfn
@chenakam it has not been upgraded in quite a while
Chenai Nakam
@chenakam
@pfn Are you planning to do an upgrade in the near future? If not, I'll give it up.
Perry
@pfn
@chenakam I am not
eason du
@doofin
@pfn Would you like to add my project https://github.com/doofin/scala4Android at sbt-android 's readme Examples section? This might be more friendly to new users.
eason du
@doofin
btw,react is not as graceful as it looks,there are better solutions like outwatch,laminar (for scala js)
Roberto Leibman
@rleibman
@doofin... but this is with really old scala/java/sbt/android, right?
I've made a phone app with that tech (https://apkpure.com/donemychores/com.dienique.housechores.android), but what I'm looking for is an up-to-date way of writing android apps with scala.
eason du
@doofin
@rleibman scala 2.11 is a little outdated,I have just encounter one or two problems switching from 2.12,but overall it's a quite pleasant experience ,after all we are writing Scala!
There are some efforts for supporting scala 2.12 and sbt 1.0,you can find those experimental branch in github
Perry
@pfn
@doofin good idea, can you send a PR for that? thanks!
hrj
@hrj
Could someone look at this PR: scala-android/sbt-android#338
Perry
@pfn
@hrj, looking to eventually :(