These are chat archives for scala-android/sbt-android

26th
Aug 2016
Rafal Wachol
@charafau
Aug 26 2016 06:43
@pfn scala-android/sbt-android#284 interesting issue
Perry
@pfn
Aug 26 2016 13:28
@charafau, do you want to try fixing it? shouldn't be hard
Rafal Wachol
@charafau
Aug 26 2016 13:41
I could try, but I'm busy with wedding...
Perry
@pfn
Aug 26 2016 14:06
whose?
Rafal Wachol
@charafau
Aug 26 2016 14:23
mine :D
Perry
@pfn
Aug 26 2016 14:36
congratulations, marrying someone in jp?
Rafal Wachol
@charafau
Aug 26 2016 15:32
yes, well we're married already but we didnt have ceremony so now we're doing preparations..
Alex Reisberg
@a-reisberg
Aug 26 2016 15:36
Congrats, @charafau :)
Rafal Wachol
@charafau
Aug 26 2016 15:37
thank you
Alex Reisberg
@a-reisberg
Aug 26 2016 15:54
Is there any way inside intellij to right click and run an android independent .scala file inside Test?
inside sbt, I can do test:runMain...
which works, but I miss being able to jump to the correct line when, for eg, an exception is thrown :)
Perry
@pfn
Aug 26 2016 18:53
@a-reisberg, if you run sbt inside an sbt tool window that happens automatically
@a-reisberg, and you should still be able to right click and run test I think...
Perry
@pfn
Aug 26 2016 19:16
@charafau, do it in November, in Miyazaki, and invite me :p
or kochi
Rafal Wachol
@charafau
Aug 26 2016 19:46
@pfn you can always come, you can sleep aty home ;)
And unfortunately Miyazaki is really far. Never been there but I've heard that onsens there are really nice
Maybe one day I will be doing fully remote job and will be able to move between Poland and Japan ;)
Alex Reisberg
@a-reisberg
Aug 26 2016 19:50
I didn't know that Miyazaki is also a name of a place!?
(rather than just the name of a director/animator)
@pfn Thanks. How do I right click and run anything inside the sbt tool window? I just see a list of dependencies.
Perry
@pfn
Aug 26 2016 19:57
list of dependencies? you're not using the sbt plugin? aa
@a-reisberg,
Alex Reisberg
@a-reisberg
Aug 26 2016 20:01
there's a separate plugin? :)
I'm using intellij w/ scala plugin
Perry
@pfn
Aug 26 2016 20:16
yes, there's a separate plugin for running sbt inside intellij
so you can just have it run inside and click line numbers
I'd consider that essential
Alex Reisberg
@a-reisberg
Aug 26 2016 20:28
@pfn Thanks. This looks great. I searched within intellij and couldn't find it, so I've been assuming that it's already included in the scala plugin.
Perry
@pfn
Aug 26 2016 20:28
yes, that, thanks @charafau
Alex Reisberg
@a-reisberg
Aug 26 2016 20:29
Apparently you have to click "browse repositories..."
@charafau Thanks!
Rafal Wachol
@charafau
Aug 26 2016 20:30
+1
Alex Reisberg
@a-reisberg
Aug 26 2016 20:42
it's working now :)
There's no tab completion in this sbt console right?
Rafal Wachol
@charafau
Aug 26 2016 20:42
There is
Alex Reisberg
@a-reisberg
Aug 26 2016 20:43
how do you enable it?
Rafal Wachol
@charafau
Aug 26 2016 20:44
It just work for me
Alex Reisberg
@a-reisberg
Aug 26 2016 20:44
strange
Rafal Wachol
@charafau
Aug 26 2016 20:44
But I'm using ammonite shell
Check it
Alex Reisberg
@a-reisberg
Aug 26 2016 20:45
ok, so many tech :)
Rafal Wachol
@charafau
Aug 26 2016 20:45
You need to press tab 2 times
Alex Reisberg
@a-reisberg
Aug 26 2016 20:45
you use ammonite inside intellij?
i'm pressing tab 10 times now, doesn't work :)
Rafal Wachol
@charafau
Aug 26 2016 20:47
No, from terminal
Alex Reisberg
@a-reisberg
Aug 26 2016 20:47
oh, the usual sbt (if I type sbt inside terminal, and not via this console thing) works fine
Alex Reisberg
@a-reisberg
Aug 26 2016 20:56

@pfn I got

Error:(6, 20) BuildConfig is already defined as object BuildConfig
public final class BuildConfig {

if I right click to run

Perry
@pfn
Aug 26 2016 20:56
right click what to run?
dunno
Alex Reisberg
@a-reisberg
Aug 26 2016 20:56
:)
right click on an object extending App
pfn @pfn shrugs
Perry
@pfn
Aug 26 2016 20:57
I guess intellij doesn't know how to build on its own
change the run profile to not build
remove 'Make'
and have it run sbt compile first
Alex Reisberg
@a-reisberg
Aug 26 2016 20:58
remove which make? intellij's make?
Perry
@pfn
Aug 26 2016 20:58
there's only 1 make
yes, you would remove intellij's make
Alex Reisberg
@a-reisberg
Aug 26 2016 20:58
let me try :)
ah, awesome
@pfn That's totally awesome :)
Thanks.
Perry
@pfn
Aug 26 2016 21:01
you could do it without the sbt plugin, but it's a lot slower to have intellij execute sbt tasks
Alex Reisberg
@a-reisberg
Aug 26 2016 21:01
right
Daniil Sivak
@seroperson
Aug 26 2016 21:14
@charafau is ammonite ready for daily use? last time it took about five seconds to 'ls' ))
Rafal Wachol
@charafau
Aug 26 2016 21:23
I only use it as repl replacement
Or if I wanna check some API
With okhttp
I think they will port it to scala native when it becomes mature
Daniil Sivak
@seroperson
Aug 26 2016 21:29
oh. i understand. that will be nice tool with scalanative.
Sriram Seshadri
@shizambles
Aug 26 2016 23:41

Hi, I am trying to use Facebook authentication in my app and have updated my build.sbt to use libraryDependencies += aar("com.facebook.android" % "facebook-android-sdk" % "4.14.1"). The code compiles fine but when I run the app, I get the following exception.
Caused by: java.lang.NoClassDefFoundError: com.facebook.R$style
at com.facebook.login.widget.LoginButton.getDefaultStyleResource(LoginButton.java:582)
at com.facebook.FacebookButtonBase.<init>(FacebookButtonBase.java:67)
at com.facebook.login.widget.LoginButton.<init>(LoginButton.java:201)

This appears to be because the final APK doesn't have the com.facebook.R classes. I also have the following entry in the proguard config.
-keep class com.facebook.** {
; }

Any ideas on why the class files are not getting picked up?

Perry
@pfn
Aug 26 2016 23:55
jar tf classes.jar in the Facebook aar
I forget if they're included there @shizambles
they should be generated during android:aars and android:rGenerator though
find target/android/generated/source
and did you proguardCache com.facebook?
can't proguardCache anything in aar
iirc