https://kotlinlang.org
Join Slack
Anyone knows how to fix this? `Execution failed for task ':shared:allTests'.` `> Failed to execu...
s

Stefan Oltmann

over 4 years ago
Anyone knows how to fix this?
Execution failed for task ':shared:allTests'.
> Failed to execute all tests:
:shared:iosX64Test: java.lang.IllegalStateException: command '/usr/bin/xcrun' exited with errors (exit code: 148)
✅ 2
s
  • 1
  • 4
  • 303
I'm having trouble with the Dialog in Jetpack Compose. I am working on a Kiosk Mode app that runs on...
t

Tom Truyen

over 1 year ago
I'm having trouble with the Dialog in Jetpack Compose. I am working on a Kiosk Mode app that runs on a massive screen. For the scaling to work correctly we had to add the following code in our MainActivity:
// Fixes the issue that the DisplayMetrics 1.5x's the size of everything
    override fun attachBaseContext(newBase: Context?) {
        val newOverride = Configuration(newBase?.resources?.configuration)
        newOverride.densityDpi = DisplayMetrics.DENSITY_MEDIUM
        applyOverrideConfiguration(newOverride)

        super.attachBaseContext(newBase)
    }
This forces our scaling to just be 1.0 The thing is that when you use a Dialog it seems to only use 2/3th of the available height and width of the screen to display its contents. The scrim however does fill the entire screen. This issue also does not happen on an Emulator, only on the physical device which is build with a Custom AOSP PCB board. Does anyone know how I can force the Dialog Content to match the size of the scrim? FillMaxSize does only fill 2/3th...
t
a
  • 2
  • 2
  • 302
Hi everyone! The Swift packages finally got some love in our docs: we published <an article on SPM e...
a

Aleksey Zamulla

over 1 year ago
Hi everyone! The Swift packages finally got some love in our docs: we published an article on SPM export. It should be useful when trying to make a Swift package out of a module (or modules) of your Kotlin Multiplatform project. If the topic is at all relevant for you, check the doc out and leave your impressions in the comments. Is something missing, or unclear? Is the page too specific, or too broad? What do you think should be covered next? Let us know. In other Apple news, we integrated links to Kotlin-Swift interopedia in our Interoperability with Swift/Objective-C page.
😍 5
👀 2
🙌 4
a
p
+2
  • 4
  • 9
  • 302
The .count() function looks a little strange with new DSL in 0.46.0. For example: ```Table .sel...
n

neetkee

almost 2 years ago
The .count() function looks a little strange with new DSL in 0.46.0. For example:
Table
    .selectAll()
    .where { Table.someColumn.eq(someValue) }
    .count()
Table
    .select(Table.id)
    .where { Table.someColumn.eq(someValue) }
    .count()
Both will produce the same query with COUNT(*). So, .selectAll, .select in this case are required, but redundant. I know it's possible to do .select(Table.id.count()), but adding .count at the end of the statement is just easier.
n
m
+2
  • 4
  • 9
  • 302
I'm doing ```System.currentTimeMillis() advanceTimeBy(1.minutes) System.currentTimeMillis()``` but t...
c

Colton Idle

over 2 years ago
I'm doing
System.currentTimeMillis()
advanceTimeBy(1.minutes)
System.currentTimeMillis()
but the difference isn't 1 minute. How do you all recommend advancing time so that the System time that is grabbed actually advances?
c
p
+2
  • 4
  • 9
  • 302
I've 2 small questions: Why is the expected version 1.6 when I have 1.8 everywhere in my code ? Why ...
p

PixelHamster

over 2 years ago
I've 2 small questions: Why is the expected version 1.6 when I have 1.8 everywhere in my code ? Why can I still compile using
gradle build
but intellij says it can't build the project:
/home/merlijn/.gradle/caches/modules-2/files-2.1/com.google.devtools.ksp/symbol-processing-gradle-plugin/1.8.21-1.0.11/84f788fcf1cbc31bb6491f29df3343c8b5fcc7c1/symbol-processing-gradle-plugin-1.8.21-1.0.11.jar!/META-INF/gradle-plugin.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
This happened when I wanted to update from 1.6 compiler to 1.8 along with kotlin 1.7.20 libs to 1.8.20
p
y
  • 2
  • 1
  • 302
Now I'm getting `The test application has already been built. Make sure you configure the applicatio...
d

dave08

about 3 years ago
Now I'm getting
The test application has already been built. Make sure you configure the application before accessing the client for the first time.
🤕... I wish Ktor would just let me create my own
testApplication
without trying to magically find an existing one...
d
e
+2
  • 4
  • 27
  • 302
Hi, is there a way to encode query params with a specific encoding, for instance UTF-8?
r

Ryunos

about 3 years ago
Hi, is there a way to encode query params with a specific encoding, for instance UTF-8?
✅ 1
r
d
j
  • 3
  • 5
  • 302
hi, is it possible to have a exponential jitter retry schedule that has a whileOutput and a untilInp...
k

kartoffelsup

about 3 years ago
hi, is it possible to have a exponential jitter retry schedule that has a whileOutput and a untilInput condition? It seem that only the last one configured wins in the chain.
val exponentialBackoff: Schedule<Throwable, Double> = Schedule.exponential(TimeUnit.SECONDS.toNanos(2L).toDouble())

val retrySchedule = exponentialBackoff.jittered()
                    .whileOutput {
                       TimeUnit.NANOSECONDS.toSecods(it.toLong()) < 10.0
                    }
                    .untilInput { 
                        when (it) {
                             is ApiException -> it.statusCode in 400 until 500
                             ...
                             else -> false
                        }
the above never stops on the whileOutput condition (using this at work and don't have the code handy, it looks at least similar to above :D)
k
s
  • 2
  • 28
  • 302
Hi all android studio compose preview fails when using `androidx.activity:activity-compose` `1.6.x`...
b

brabo-hi

over 3 years ago
Hi all android studio compose preview fails when using
androidx.activity:activity-compose
1.6.x
but works with version
1.4.x
b
j
  • 2
  • 5
  • 302
Previous233234235Next

kotlinlang

A modern programming language that makes developers happier.

Powered by