nevardreik
01/25/2022, 4:43 AM1.5.21
-> 1.5.30
… The issue im experiencing is specifically with packForXcode
where Gradle is returning an error messae all of a sudden
* What went wrong:
Could not create task ':mobile-shared:packForXcode'.
> Key releaseFramework is missing in the map.
I have had a look around online first for solutions, but really can’t see any resolutions or hints to point me in the right direction. Anyone have any ideas? I’ll post my packForXcode
task as a thread comment.Travis Reitter
01/25/2022, 7:48 AMiosMain
, when viewed in Android Studio, have broken syntax highlighting and I get a warning that Kotlin is not configured. If I configure it for the module, I get some extra blocks added to my KMM module's Gradle file (as well as my Android app's Gradle file) which doesn't fix the syntax highlighting in the iosMain
Kotlin files. It also breaks my Android app config and seems to make some other broken configuration (like adding classpath(kotlinModule("gradle-plugin", kotlin_version))
where kotlinModule
can't be resolved) and adding androidx-core:core-ktx:+
and stdlib-jdk7
to my KMM module's dependencies (not just for androidMain
)
What's the proper way to configure Kotlin for iosMain
and fix the syntax highlighting?Nilay Dağdemir
01/25/2022, 12:21 PM* What went wrong: Task 'embedAndSignAppleFrameworkForXcode' not found in project ':shared'.
This error occures only on Mac Mini with M1 silicon chip. It works well on Macbook with an intel chip. I tried every solution online, nothing worked. Do you have any idea how to fix this?Imran/Malic
01/25/2022, 2:51 PM1.6.10
and using the Regex:
Regex("^?(//(?<authority>((?<userinfo>[^/?#]*)@)?(?<host>(\\[[^\\]]*\\]|[^/?#:]*))(:(?<port>[^/?#]*))?))?(?<path>[^?#]*)(\\?(?<query>[^#]*))?(#(?<fragment>.*))?")
I am running into an issue running tests against js and nativ platforms: <stacktrace is below>
The error points to the second /
at the beginning ^?(//
of the expression. But I am not getting smarter from the error messageMichael Paus
01/25/2022, 3:29 PMJohannes Fahrenkrug
01/25/2022, 6:51 PM1.6.20-dev-7317
(both for kotlin("multiplatform")
and for kotlin("native.cocoapods")
, I get Unresolved reference: cocoapods
when trying to import cocoapods
in a .kt file. For example import cocoapods.libsodium.crypto_sign_state
. This worked fine with 1.6.10
. Do I need to do this kind of import differently when using 1.6.20
?tylerwilson
01/25/2022, 10:22 PMPeter Hsu
01/25/2022, 11:50 PMapi(project(":some:domain"))
, but when I look at the generated header files in the framework, I don't see any reference to the classes in some:domainVivek Modi
01/26/2022, 12:11 AMDave Trollope
01/26/2022, 3:51 AM/Users/davetrollope/AndroidStudioProjects/KMMEG2022B/build/ios/Debug-iphonesimulator/iosApp.app
Error returned in reply: Connection invalid
com.intellij.execution.ExecutionException: Error returned in reply: Connection invalid
Process finished with exit code 0
Android project runs fine. Ideas? (edited)Paul Weber
01/27/2022, 5:59 PMJohn Aoussou
01/28/2022, 2:30 AMchansek
01/28/2022, 6:16 AMdata class UserRole(
val entity: Entity,
val role: Role,
val entityId: String
) {
fun isAdmin() = role == Role.ADMIN
}
When I do serialize it, I get admin
as a property. How can I avoid that?Travis Reitter
01/28/2022, 6:35 PMJeff Lockhart
01/28/2022, 8:54 PMExecution failed for task ':shared:podGenIOS'.
> 'pod gen' command failed with an exception:
Cannot run program "pod" (in directory "/.../shared/build/cocoapods/synthetic/IOS"): error=2, No such file or directory
Possible reason: CocoaPods is not installed
Please check that CocoaPods v1.10 or above and cocoapods-generate plugin are installed.
To check CocoaPods version type 'pod --version' in the terminal
To install CocoaPods execute 'sudo gem install cocoapods'
To install cocoapod-generate execute 'sudo gem install cocoapods-generate'
cocoapods
and cocoapods-generate
are both installed and work when executed from the terminal. The build worked before the Android Studio upgrade as well. ./gradlew :shared:podGenIOS
also works on the command line and after completion, the AS gradle sync completes successfully, until it fails again later. Has anyone else experienced anything like this or have any idea what the issue might be?Rohan Maity
01/29/2022, 9:08 AMjean
01/29/2022, 9:19 PMDependency on pods requires cocoapods-generate plugin to be installed.
If you plan to add dependencies on third party pods, don’t forget to install it by executing ‘gem install cocoapods-generate’ in terminal.and this error
Execution failed for task ':shared:podInstall'.
> 'pod install' command failed with code 1.
Error message:
Please, check that podfile contains following lines in header:
source '<https://cdn.cocoapods.org>'
Please, check that each target depended on shared contains following dependencies:
I did follow this 7-steps https://youtrack.jetbrains.com/issue/KT-49418#focus=Comments-27-5429773.0-0 but it still doesn’t work. I had to adjust it a bit since I have a Mac/Intel computer. I added this to my ~/.zshrc
export LANG=en_US.UTF-8
export PATH="/usr/local/opt/ruby@2.7/bin:/usr/local/lib/ruby/gems/2.7.0/bin:$PATH"
I did try both
sudo gem install -n /usr/local/bin cocoapods
sudo gem install -n /usr/local/bin cocoapods-generate
and
sudo gem install cocoapods
sudo gem install cocoapods-generate
Anything else I should try?Yevhen Railian
01/30/2022, 2:03 PMNilay Dağdemir
01/31/2022, 12:08 PMkotlin {
iosArm64(*"myapp"*) {
binaries {
framework {
embedBitcode(*"bitcode"*) // for release binaries.
}
}
}
}
I searched but couldn’t find a clear answer about this subject.
*I’m not using cocoapodsLukasz Kalnik
01/31/2022, 11:02 PMapiConfigRepository
dependency I get the exception `mutation attempt of frozen ApiConfigurationRepositoryImpl@1edb608`:
class TVShowsSharedViewModelImpl(
dispatcher: CoroutineDispatcher = Dispatchers.Main
) : TVShowsSharedViewModel,
KoinComponent {
val coroutineScope = CoroutineScope(dispatcher)
val tmdbApi: TmdbApi by inject()
val apiConfigRepository: ApiConfigurationRepository by inject()
init {
coroutineScope.launch {
val apiConfig = tmdbApi.getConfiguration()
with(apiConfigRepository) {
imageBaseUrl = apiConfig.images.baseUrl
updateBackdropSizes(apiConfig.images.backdropSizes)
}
}
}
}
ynsok
02/01/2022, 12:15 PMCannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option
Any suggestion how to solve it ?martmists
02/01/2022, 2:23 PMe: /home/mart/git/command_parser/src/commonTest/kotlin/CommandTests.kt: (7, 15): Unresolved reference: test
e: /home/mart/git/command_parser/src/commonTest/kotlin/CommandTests.kt: (8, 15): Unresolved reference: test
e: /home/mart/git/command_parser/src/commonTest/kotlin/CommandTests.kt: (11, 6): Unresolved reference: Test
e: /home/mart/git/command_parser/src/commonTest/kotlin/CommandTests.kt: (23, 13): Unresolved reference: assertTrue
despite having this in my build.gradle.kts:
val commonTest by getting {
dependencies {
implementation("org.jetbrains.kotlin:kotlin-test-common:1.6.10")
implementation("org.jetbrains.kotlin:kotlin-test-annotations-common:1.6.10")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.0")
}
}
and the code for testing is
import com.martmists.commandparser.dispatch.Context
import com.martmists.commandparser.dispatch.Dispatcher
import com.martmists.commandparser.dsl.build
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.*
import kotlinx.coroutines.test.runTest
import kotlin.test.Test
import kotlin.test.assertTrue
class CommandTests {
@Test
fun testNoArgs() = runTest {
launch(Dispatchers.Main) {
val dispatcher = Dispatcher<Context>()
build(dispatcher) {
command("test") {
action {
println("test success")
}
}
}
val ctx = Context("test")
assertTrue(dispatcher.dispatch(ctx))
}
}
}
Paul Woitaschek
02/01/2022, 3:41 PMAlen Kirm
02/01/2022, 4:28 PMbaseName
property is ignored, when running module:assembleXCFramework
Gradle task.
Output XCFramework is named by the module itself (shared.XCFramework) and the same applies to fat-frameworks.
Is this known issue, or am I missing the purpose of baseName
property ? Thanks.gbaldeck
02/01/2022, 7:04 PMIgor Milakovic
02/02/2022, 7:05 PMwarning: (x86_64) could not find object file symbol for symbol _kfun:io.ktor.utils.io.ByteChannelSequentialBase#<get-readByteOrder>(){}io.ktor.utils.io.core.ByteOrder
warning: (x86_64) could not find object file symbol for symbol _kfun:io.ktor.utils.io.ByteChannelSequentialBase#<set-readByteOrder>(io.ktor.utils.io.core.ByteOrder){}
warning: (x86_64) could not find object file symbol for symbol _kfun:io.ktor.utils.io.ByteChannelSequentialBase#<get-writeByteOrder>(){}io.ktor.utils.io.core.ByteOrder
warning: (x86_64) could not find object file symbol for symbol _kfun:io.ktor.utils.io.ByteChannelSequentialBase#<set-writeByteOrder>(io.ktor.utils.io.core.ByteOrder){}
Literally, 5100+ warnings similar to the above ^
Thanks!Bohdan
02/03/2022, 12:01 AMdarkmoon_uk
02/03/2022, 5:05 AMJonas Frid
02/03/2022, 8:19 AMGillian Buijs
02/03/2022, 12:52 PMGillian Buijs
02/03/2022, 12:52 PMGrégory Lureau
02/03/2022, 1:18 PMGillian Buijs
02/03/2022, 1:21 PMclass Service(
client: CloudClient? = null
){
class Service {
private val mdexClient = CloudClient()
}
russhwolf
02/03/2022, 2:10 PMGillian Buijs
02/03/2022, 2:14 PMScott Kruse
02/03/2022, 4:16 PMrusshwolf
02/03/2022, 5:21 PMScott Kruse
02/03/2022, 5:24 PMBob
03/31/2022, 5:01 AM*let* command = shared.FFmpegCommand.Builder()
<- ‘init()’ is unavailable
Kotlin
class FFmpegCommand private constructor(
private val inputs: String?,
private val concat: String?,
val command: StringBuilder = StringBuilder("-y")
.append(inputs)
.append(concat)
) {
data class Builder(
var inputs: List<String> = emptyList(),
var concat: String? = "",
) {
fun inputs(inputs: List<String>) = apply { this.inputs = inputs }
fun concat(output: String) = apply { this.concat = buildConcatFilter(this.inputs.size, output)}
fun build() = FFmpegCommand(
inputs.joinToString("") { " -i $it" },
concat,
).command.toString()
private fun buildConcatFilter(size: Int, output: String): String {
val filterBuilder = StringBuilder(" -filter_complex \"")
for (i in 0..size) filterBuilder.append("[$i]")
filterBuilder.append("concat=n=$size:v=1:a=1[v1][a1]\"")
filterBuilder.append(" -map '[v0]'")
filterBuilder.append(" $output")
return filterBuilder.toString()
}
}
}
I need to the defaulting for the builder. I’m not sure how to get around this onerusshwolf
03/31/2022, 4:44 PMdata class Builder(
var inputs: List<String> = emptyList(),
var concat: String? = "",
) {
constructor() : this(emptyList(), "")
...
}
Bob
03/31/2022, 4:52 PM