Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Roberto Leibman
@rleibman
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 :(
finally have some break from work
Michael Gottschalk
@migo
I'm trying to use the current version of mapbox-android-sdk (9.1.0) with sbt-android. It has com.facebook.soloader as a transitive dependency and now I get this error when compiling:
[error] (guidemate/android:rGenerator) Error: more than one library with package name 'com.facebook.soloader'
The error disappears when I exclude com.facebook.soloader (as expected), but this library is probably needed somewhere, so I don't know if this is really an option.
Does anybody have an idea by what this could be caused and how it could be fixed?
Michael Gottschalk
@migo
I think I will simply use an older version - this version also seems to need Java 9 (which is incompatible with Scala 2.11?). With version 8.1.1, my project seems to compile at least.
Perry
@pfn
@migo I don't have an answer for that now -- I need to do some investigating and get back into working on sbt-android; not sure if it's still valuable
Michael Gottschalk
@migo
What do you mean by "still valuable"? Is there any alternative for scala on android at the moment?
There seems to be a gradle plugin, but this also seems to be discontinued...
Potato Pie
@piepotato_gitlab
Hello guys, I am trying to create a new android app using gen-android. I have followed instructions on scala-android.org and i ended up with this error.
image.png
I am starting sbt in project root directory.
Michael Gottschalk
@migo
@pfn Concerning the problem more than one library with package name ...: It seems to have been a problem in gradle, too. Here, it is suggested that the problem was fixed in a newer gradle version: https://stackoverflow.com/questions/51024717/error-more-than-one-library-with-package-name-android-support-graphics-drawabl
Perry
@pfn
@migo what exactly is the library/dependency that conflicts?
as for value, since android is stuck with scala 2.11 at best, I don't really feel it's worthwhile to keep sbt-android up to date anymore
the fix is to use only the correct dependency graph
it's not a plugin fix to resolve this
Michael Gottschalk
@migo
The problem always seems to occur when I update the support library version from 27.1.1 to 28.0.0.