https://kotlinlang.org
Join Slack
Hi guys i upgraded to Xcode 15, and i am having issue building the shared module, here is the error ...
b

brabo-hi

over 2 years ago
Hi guys i upgraded to Xcode 15, and i am having issue building the shared module, here is the error
Please try to disable compiler caches and rerun the build. To disable compiler caches, add the following line to the gradle.properties file in the project's root directory:
    
    kotlin.native.cacheKind.iosArm64=none
    
Also, consider filing an issue with full Gradle log here: <https://kotl.in/issue>
The /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld command returned non-zero exit code: 1.
output:
-iphoneos_version_min has been renamed to -ios_version_min
ld: warning: ignoring duplicate library '-ldl'
ld: unknown options: -sdk_version
b
a
  • 2
  • 1
  • 1529
Does okhttp have a way of limiting the maximum number of connections used? I see <ConnectionPool> al...
a

Aaron Todd

about 3 years ago
Does okhttp have a way of limiting the maximum number of connections used? I see ConnectionPool allows configuring
maxIdleConnections
but says nothing of maximum total connections allowed to be created/active. I also am not seeing an equivalent of a
connectAcquireTimeout
...
a
j
  • 2
  • 23
  • 1518
I’m getting this error message `Polymorphic serializer was not found for class discriminator 'batter...
j

jean

over 3 years ago
I’m getting this error message
Polymorphic serializer was not found for class discriminator 'batteryPercentage', JSON input: {"name":"batteryPercentage","value":70}
@JsonClassDiscriminator("name")
interface DeviceAttribute

@Serializable
data class Device(
    val id: String,
    val name: String,
    val icon: String,
    val iconOptions: List<String>,
    val attributes: List<DeviceAttribute> = emptyList(),
    val profiles: List<ActiveProfileMode>?,
)

@Serializable
@SerialName("batteryPercentage")
data class BatteryPercentage(val value: Int) : DeviceAttribute
What am I missing here?
j
e
+2
  • 4
  • 4
  • 1512
How can I create a Full Screen dialog? Dialog properties throw an error. Does anyone know of a diffe...
t

Tolga ÇAĞLAYAN

about 3 years ago
How can I create a Full Screen dialog? Dialog properties throw an error. Does anyone know of a different method?
t
z
  • 2
  • 5
  • 1507
Has anyone tried measuring the size increase on a Compose multiplatform app? I built a one-screen sa...
j

Jacob Ras

over 2 years ago
Has anyone tried measuring the size increase on a Compose multiplatform app? I built a one-screen sample app that loads a list of cat pictures and shows them in a list. Clicking one enlarges it. I built it native (SwiftUI on iOS), KMP (Compose) and in Flutter to compare the three. On Android I'm seeing expected results (available in repo below). On iOS however, the size increase seems excessive. A thinned release build: native 1.7 MB, Compose: 24.8 MB, Flutter 48.1 MB. Debug build for simulator shows a similar ratio (4.6 / 57.6 / 91.8 MB). I don't think the Compose build is supposed to be that big, since I'm just using a couple of components. Please correct me if I'm wrong! 🙏 I have one guess: that the library isn't being stripped. I tried opening up the iOS archive without any luck (only binary files, didn't understand much of it 😬) All code + Android comparison results: https://github.com/jacobras/flutter-vs-native-vs-kmp Feel free to play around with it.
😮 2
👍 6
j
p
+4
  • 6
  • 13
  • 1503
Is there a way to show a Compose popup or dialog from an Android custom view? We have lots of Androi...
e

Eric Martori

over 3 years ago
Is there a way to show a Compose popup or dialog from an Android custom view? We have lots of Android custom views that we don't have the time to migrate fully to compose, but we are adding new developments in compose gradually. Adding
ComposeView
in the XML works for most cases, but now we have to show a pop window and an alert on user interaction. We have tried creating the
PopupWindow
and
AlertDialog
programmatically and setting the content view as a
ComposeView
with the desired content but we get errors like:
java.lang.IllegalStateException: ViewTreeLifecycleOwner not found from android.widget.PopupWindow$PopupDecorView
So we are thinking that maybe there is a way to launch the alert and popup directly from compose, but don't know how to launch it from inside a custom view without replacing the already working content.
e
m
a
  • 3
  • 18
  • 1493
Hi :wave: I've been trying to add GoogleMaps to my KMP (Android/iOS) project and it's been a strugg...
m

Mantas Latkauskas

almost 2 years ago
Hi 👋 I've been trying to add GoogleMaps to my KMP (Android/iOS) project and it's been a struggle. I have expected/actual implementations for the map. Android works fine, but I've been trying to add iOS Pod for three days with no success. I've somewhat been following this project https://github.com/realityexpander/FredsRoadtripStoryteller (I can build it fine). I've tried clear caches, pod deintegrate/install many times 😄 The error I'm getting is :
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld invocation reported errors
ld: framework 'GoogleMaps' not found
I can build the iOS project until I add
pod("GoogleMaps") {
            version = "8.3.1"
            extraOpts += listOf("-compiler-option", "-fmodules")
}
in my build.gradle.kts (:composeApp) cocoapods {...} block to access
import cocoapods.GoogleMaps...
in my iosMain directory.
🧵 2
m
i
+4
  • 6
  • 15
  • 1491
I convinced ChatGPT from OpenAI to write me Kotlin code that uses a Ktor client to pull down the "<h...
y

Youssef Shoaib [MOD]

about 3 years ago
I convinced ChatGPT from OpenAI to write me Kotlin code that uses a Ktor client to pull down the "https://kotlinlang.org/docs/whatsnew14.html" and asked it for an example of what the code would output (I have to be very wordy with it or else it gets angry and reminds me that it can't run code lol). Eventually, I made it "send a request" to "https://kotlinlang.org/docs/whatsnew19.html", but that produced the same output, just with Kotlin 1.9 as the version number. Finally, I convinced it that Kotlin 1.9 actually includes Union Types (🙏 ) and made it go to the
<h2>
tag that talks about Union types, and print out it and its siblings, and this is what it produced: See 🧵 for some other interesting observations about it, including Kotlin-specific ones, if anyone is curious
y
v
  • 2
  • 10
  • 1490
Hi, does anyone know how to solve "No such module composeApp" error
s

Saul

over 1 year ago
Hi, does anyone know how to solve "No such module composeApp" error
s
p
  • 2
  • 6
  • 1489
What would be the best way to add firebase to a KMP + Compose Multiplatform App that targets Android...
a

Anudeep Ananth

over 1 year ago
What would be the best way to add firebase to a KMP + Compose Multiplatform App that targets Android and iOS. I want to use the firebase official android and iOS libraries with a custom expect and actual implementation... What woukd be the right architecture to do this?
a
h
+2
  • 4
  • 5
  • 1487
Previous192021Next

kotlinlang

A modern programming language that makes developers happier.

Powered by