Skip to content
This repository has been archived by the owner on Aug 10, 2021. It is now read-only.

Execution failed for task ':compileKotlinAndroidNativeArm32'. when using coroutines for native targets androidNativeArm32/androidNativeArm64 #3914

Closed
algidrus opened this issue Feb 26, 2020 · 5 comments

Comments

@algidrus
Copy link

a) Yesterday I tried to use a coroutines for targets androidNativeArm32/androidNativeArm64, but it doesn't works. For iOS/MacOS/Linux it works fine.

b) For android native targets I'm using implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core-native:1.3.+"), but if I change it to another version, e.g. 1.2.2, or try to use implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core-android:1.3.+") some error occurs:
"...src/main/test.kt: (5, 16): Unresolved reference: coroutines"
"...src/main/test.kt: (6, 16): Unresolved reference: coroutines"
"...src/main/test.kt: (11, 5): Unresolved reference: runBlocking"

Build machineOS: MacOS
Kotlin/Native 1.3.61

==== build.gralde.kts part: =====
sourceSets {
val commonMain by getting {
kotlin.srcDirs("./src/main")
dependencies {
implementation(kotlin("stdlib-common"))
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.+")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core-native:1.3.+")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core-common:1.3.+")
}
}

=== Log for A) part ===:
Execution failed for task ':compileKotlinAndroidNativeArm32'.

Could not resolve all files for configuration ':androidNativeArm32CompileKlibraries'.
Could not find org.jetbrains.kotlin:kotlin-stdlib-common:1.3.70-eap-42.
Searched in the following locations:
- file:/Users/Andei/.m2/repository/org/jetbrains/kotlin/kotlin-stdlib-common/1.3.70-eap-42/kotlin-stdlib-common-1.3.70-eap-42.pom
- https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.3.70-eap-42/kotlin-stdlib-common-1.3.70-eap-42.pom
- https://dl.bintray.com/kotlin/ktor/org/jetbrains/kotlin/kotlin-stdlib-common/1.3.70-eap-42/kotlin-stdlib-common-1.3.70-eap-42.pom
- https://kotlin.bintray.com/kotlinx/org/jetbrains/kotlin/kotlin-stdlib-common/1.3.70-eap-42/kotlin-stdlib-common-1.3.70-eap-42.pom
Required by:
project :
Could not resolve org.jetbrains.kotlinx:kotlinx-coroutines-core-native:1.3.+.
Required by:
project :
> Unable to find a matching variant of org.jetbrains.kotlinx:kotlinx-coroutines-core-native:1.3.3-1.3.70-eap-42:
- Variant 'iosArm32-api' capability org.jetbrains.kotlinx:kotlinx-coroutines-core-native:1.3.3-1.3.70-eap-42:
- Incompatible attribute:
- Required org.jetbrains.kotlin.native.target 'android_arm32' and found incompatible value 'ios_arm32'.
- Other attributes:
- Found org.gradle.status 'release' but wasn't required.
- Required org.gradle.usage 'kotlin-api' and found compatible value 'kotlin-api'.
- Required org.jetbrains.kotlin.platform.type 'native' and found compatible value 'native'.
- Variant 'iosArm64-api' capability org.jetbrains.kotlinx:kotlinx-coroutines-core-native:1.3.3-1.3.70-eap-42:
- Incompatible attribute:
- Required org.jetbrains.kotlin.native.target 'android_arm32' and found incompatible value 'ios_arm64'.
- Other attributes:
- Found org.gradle.status 'release' but wasn't required.
- Required org.gradle.usage 'kotlin-api' and found compatible value 'kotlin-api'.
- Required org.jetbrains.kotlin.platform.type 'native' and found compatible value 'native'.
- Variant 'iosX64-api' capability org.jetbrains.kotlinx:kotlinx-coroutines-core-native:1.3.3-1.3.70-eap-42:
- Incompatible attribute:
- Required org.jetbrains.kotlin.native.target 'android_arm32' and found incompatible value 'ios_x64'.
- Other attributes:
- Found org.gradle.status 'release' but wasn't required.
- Required org.gradle.usage 'kotlin-api' and found compatible value 'kotlin-api'.
- Required org.jetbrains.kotlin.platform.type 'native' and found compatible value 'native'.
- Variant 'js-api' capability org.jetbrains.kotlinx:kotlinx-coroutines-core-native:1.3.3-1.3.70-eap-42:
- Incompatible attribute:
- Required org.jetbrains.kotlin.platform.type 'native' and found incompatible value 'js'.
- Other attributes:
- Found org.gradle.status 'release' but wasn't required.
- Required org.gradle.usage 'kotlin-api' and found compatible value 'kotlin-api'.
- Required org.jetbrains.kotlin.native.target 'android_arm32' but no value provided.
- Variant 'js-runtime' capability org.jetbrains.kotlinx:kotlinx-coroutines-core-native:1.3.3-1.3.70-eap-42:
- Incompatible attributes:
- Required org.gradle.usage 'kotlin-api' and found incompatible value 'kotlin-runtime'.
- Required org.jetbrains.kotlin.platform.type 'native' and found incompatible value 'js'.
- Other attributes:
- Found org.gradle.status 'release' but wasn't required.
- Required org.jetbrains.kotlin.native.target 'android_arm32' but no value provided.
- Variant 'jvm-api' capability org.jetbrains.kotlinx:kotlinx-coroutines-core-native:1.3.3-1.3.70-eap-42:
- Incompatible attribute:
- Required org.jetbrains.kotlin.platform.type 'native' and found incompatible value 'jvm'.
- Other attributes:
- Found org.gradle.libraryelements 'jar' but wasn't required.
- Found org.gradle.status 'release' but wasn't required.
- Required org.gradle.usage 'kotlin-api' and found compatible value 'java-api'.
- Required org.jetbrains.kotlin.native.target 'android_arm32' but no value provided.
- Variant 'jvm-runtime' capability org.jetbrains.kotlinx:kotlinx-coroutines-core-native:1.3.3-1.3.70-eap-42:
- Incompatible attribute:
- Required org.jetbrains.kotlin.platform.type 'native' and found incompatible value 'jvm'.
- Other attributes:
- Found org.gradle.libraryelements 'jar' but wasn't required.
- Found org.gradle.status 'release' but wasn't required.
- Required org.gradle.usage 'kotlin-api' and found compatible value 'java-runtime'.
- Required org.jetbrains.kotlin.native.target 'android_arm32' but no value provided.
- Variant 'linuxX64-api' capability org.jetbrains.kotlinx:kotlinx-coroutines-core-native:1.3.3-1.3.70-eap-42:
- Incompatible attribute:
- Required org.jetbrains.kotlin.native.target 'android_arm32' and found incompatible value 'linux_x64'.
- Other attributes:
- Found org.gradle.status 'release' but wasn't required.
- Required org.gradle.usage 'kotlin-api' and found compatible value 'kotlin-api'.
- Required org.jetbrains.kotlin.platform.type 'native' and found compatible value 'native'.
- Variant 'macosX64-api' capability org.jetbrains.kotlinx:kotlinx-coroutines-core-native:1.3.3-1.3.70-eap-42:
- Incompatible attribute:
- Required org.jetbrains.kotlin.native.target 'android_arm32' and found incompatible value 'macos_x64'.
- Other attributes:
- Found org.gradle.status 'release' but wasn't required.
- Required org.gradle.usage 'kotlin-api' and found compatible value 'kotlin-api'.
- Required org.jetbrains.kotlin.platform.type 'native' and found compatible value 'native'.
- Variant 'metadata-api' capability org.jetbrains.kotlinx:kotlinx-coroutines-core-native:1.3.3-1.3.70-eap-42:
- Incompatible attribute:
- Required org.jetbrains.kotlin.platform.type 'native' and found incompatible value 'common'.
- Other attributes:
- Found org.gradle.status 'release' but wasn't required.
- Required org.gradle.usage 'kotlin-api' and found compatible value 'kotlin-api'.
- Required org.jetbrains.kotlin.native.target 'android_arm32' but no value provided.
- Variant 'mingwX64-api' capability org.jetbrains.kotlinx:kotlinx-coroutines-core-native:1.3.3-1.3.70-eap-42:
- Incompatible attribute:
- Required org.jetbrains.kotlin.native.target 'android_arm32' and found incompatible value 'mingw_x64'.
- Other attributes:
- Found org.gradle.status 'release' but wasn't required.
- Required org.gradle.usage 'kotlin-api' and found compatible value 'kotlin-api'.
- Required org.jetbrains.kotlin.platform.type 'native' and found compatible value 'native'.
- Variant 'tvosArm64-api' capability org.jetbrains.kotlinx:kotlinx-coroutines-core-native:1.3.3-1.3.70-eap-42:
- Incompatible attribute:
- Required org.jetbrains.kotlin.native.target 'android_arm32' and found incompatible value 'tvos_arm64'.
- Other attributes:
- Found org.gradle.status 'release' but wasn't required.
- Required org.gradle.usage 'kotlin-api' and found compatible value 'kotlin-api'.
- Required org.jetbrains.kotlin.platform.type 'native' and found compatible value 'native'.
- Variant 'tvosX64-api' capability org.jetbrains.kotlinx:kotlinx-coroutines-core-native:1.3.3-1.3.70-eap-42:
- Incompatible attribute:
- Required org.jetbrains.kotlin.native.target 'android_arm32' and found incompatible value 'tvos_x64'.
- Other attributes:
- Found org.gradle.status 'release' but wasn't required.
- Required org.gradle.usage 'kotlin-api' and found compatible value 'kotlin-api'.
- Required org.jetbrains.kotlin.platform.type 'native' and found compatible value 'native'.
- Variant 'watchosArm32-api' capability org.jetbrains.kotlinx:kotlinx-coroutines-core-native:1.3.3-1.3.70-eap-42:
- Incompatible attribute:
- Required org.jetbrains.kotlin.native.target 'android_arm32' and found incompatible value 'watchos_arm32'.
- Other attributes:
- Found org.gradle.status 'release' but wasn't required.
- Required org.gradle.usage 'kotlin-api' and found compatible value 'kotlin-api'.
- Required org.jetbrains.kotlin.platform.type 'native' and found compatible value 'native'.
- Variant 'watchosArm64-api' capability org.jetbrains.kotlinx:kotlinx-coroutines-core-native:1.3.3-1.3.70-eap-42:
- Incompatible attribute:
- Required org.jetbrains.kotlin.native.target 'android_arm32' and found incompatible value 'watchos_arm64'.
- Other attributes:
- Found org.gradle.status 'release' but wasn't required.
- Required org.gradle.usage 'kotlin-api' and found compatible value 'kotlin-api'.
- Required org.jetbrains.kotlin.platform.type 'native' and found compatible value 'native'.
- Variant 'watchosX86-api' capability org.jetbrains.kotlinx:kotlinx-coroutines-core-native:1.3.3-1.3.70-eap-42:
- Incompatible attribute:
- Required org.jetbrains.kotlin.native.target 'android_arm32' and found incompatible value 'watchos_x86'.
- Other attributes:
- Found org.gradle.status 'release' but wasn't required.
- Required org.gradle.usage 'kotlin-api' and found compatible value 'kotlin-api'.
- Required org.jetbrains.kotlin.platform.type 'native' and found compatible value 'native'.
Could not find org.jetbrains.kotlin:kotlin-stdlib:1.3.70-eap-42.
Searched in the following locations:
- file:/Users/Andei/.m2/repository/org/jetbrains/kotlin/kotlin-stdlib/1.3.70-eap-42/kotlin-stdlib-1.3.70-eap-42.pom
- https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.3.70-eap-42/kotlin-stdlib-1.3.70-eap-42.pom
- https://dl.bintray.com/kotlin/ktor/org/jetbrains/kotlin/kotlin-stdlib/1.3.70-eap-42/kotlin-stdlib-1.3.70-eap-42.pom
- https://kotlin.bintray.com/kotlinx/org/jetbrains/kotlin/kotlin-stdlib/1.3.70-eap-42/kotlin-stdlib-1.3.70-eap-42.pom
Required by:
project : > org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.3-1.3.70-eap-42
Could not find org.jetbrains.kotlin:kotlin-stdlib-common:1.3.70-eap-42.
Searched in the following locations:
- file:/Users/Andei/.m2/repository/org/jetbrains/kotlin/kotlin-stdlib-common/1.3.70-eap-42/kotlin-stdlib-common-1.3.70-eap-42.pom
- https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.3.70-eap-42/kotlin-stdlib-common-1.3.70-eap-42.pom
- https://dl.bintray.com/kotlin/ktor/org/jetbrains/kotlin/kotlin-stdlib-common/1.3.70-eap-42/kotlin-stdlib-common-1.3.70-eap-42.pom
- https://kotlin.bintray.com/kotlinx/org/jetbrains/kotlin/kotlin-stdlib-common/1.3.70-eap-42/kotlin-stdlib-common-1.3.70-eap-42.pom
Required by:
project : > org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.3-1.3.70-eap-42
project : > org.jetbrains.kotlinx:kotlinx-coroutines-core-common:1.3.3-1.3.70-eap-42

========== Sample to compile test.kt=============
package test

import kotlin.text.*
import kotlin.native.concurrent.*
import kotlinx.coroutines.*
import kotlinx.coroutines.channels.*

@kotlin.ExperimentalStdlibApi
fun main(args: Array)
{
runBlocking {
}
}

@artdfel
Copy link
Contributor

artdfel commented Feb 26, 2020

Hello! The problem here is that the coroutines library is not being distributed for this target for now. Please see this issue for further details.

@algidrus
Copy link
Author

algidrus commented Feb 26, 2020

It's very very sad, cause I chose this language (Kotlin/Native) to implement a big part of my projects and make those cross-platform.
I need to know will the coroutine library be distributed for androidNativeArm32/androidNativeArm64 soon or not? If not, I have to move back to C++ implementation, it works fine for iOS/MacOS/Linux/Window/Android.

@artdfel
Copy link
Contributor

artdfel commented Feb 26, 2020

As can be found in the issue above, this problem comes from another library that coroutines depend on. I cannot give any ETA right now, but as you can see, there is some community interest here. You can also participate in the discussion there, increasing its priority.
Also, can I ask about the purpose of targeting Native Android instead of an ordinary Android target use? It definitely has coroutines and other Kotlin libraries distributed.

@algidrus
Copy link
Author

algidrus commented Feb 26, 2020

We have some unique algorithms and their implementations, that's why we need a Kotlin native to hide this part as separated SO libraries. It would makes a native source code more flexible, cause it would be really cross-platfomed and compilable without any modifications on iOS/MacOS/Linux/Andoid/Windows. Otherwise, e.g. for Android there is no problem to reverse APK and recompile it. Why native android targets still stay aside, but for other platforms coroutines works as a neotemlemoy part of a native Kotlin? I search a new possibility to move from C++ to another more flexible and modern language e.g. Kotlin, and the first requirement is a real cross-platformed for a native code. I thought Kotlin can help me on that case, but for now C++ still takes a lead. Hope it will changed as soon as possible.

@SvyatoslavScherbina
Copy link
Collaborator

Closing as duplicate of Kotlin/kotlinx.coroutines#812.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants