Hi, I want to add dev sdk ```plugins { id 'org...
# kotlin-native
v
Hi, I want to add dev sdk
Copy code
plugins {
    id 'org.jetbrains.kotlin.multiplatform' version '1.3.60-dev-1981'
}
repositories {
    maven {
        url '<https://dl.bintray.com/kotlin/kotlin-dev/>'
    }
}
But it is error
Copy code
Plugin [id: 'org.jetbrains.kotlin.multiplatform', version: '1.3.60-dev-1981'] was not found in any of the following sources:
Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'org.jetbrains.kotlin.multiplatform:org.jetbrains.kotlin.multiplatform.gradle.plugin:1.3.60-dev-1981')
  Searched in the following repositories:
    Gradle Central Plugin Repository
How to do to fix it? Thanks
r
Plugins don’t read from a module-level
repositories
block. Need to add it to
repositories
inside of
pluginResolution
block in
settings.gradle
. See https://docs.gradle.org/current/userguide/plugins.html#sec:custom_plugin_repositories
v
My settings.gradle
Copy code
pluginManagement {
    resolutionStrategy {
        eachPlugin {
            if (requested.id.id == "kotlin-multiplatform") {
                useModule("org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.60-dev-1981")
            }
        }
    }

    repositories {
        maven { url = uri("<https://dl.bintray.com/kotlin/kotlin-dev>") }
        mavenCentral()
    }
}
My build.gradle
Copy code
plugins {
//    id 'org.jetbrains.kotlin.multiplatform' version '1.3.50'
    id 'org.jetbrains.kotlin.multiplatform' version '1.3.60-dev-1981'
}
repositories {
    maven {
        url '<https://dl.bintray.com/kotlin/kotlin-dev/>'
    }

    mavenCentral()
}
But My .konan download
Copy code
kotlin-native-macos-1.3.50-dev-11052
it is not 1.3.60-dev-1981!! Because I need “androidNativeX64” Target, but use “1.3.50-dev-11052" still get error 『org.jetbrains.kotlin.konan.target.TargetSupportException: Unknown target: android_x64. Use -list_targets to see the list of available targets』 Thanks
a
Hello! Can you try to change the version to the most recent
1.3.60-dev-2224
? This one surely uses
1.3.60-dev-12266
version of the Native.
v
Thanks, it is fine
but
got another warning and error
Copy code
> Task :linkDebugSharedAndroidNativeX64
Produced library API in libAndroidNative_api.h
/var/folders/ds/2v9832g575jblpl14n7p3nxh0000gn/T/konan_temp8731364866561395231/api.cpp:81:11: warning: empty struct has size 0 in C, size 1 in C++ [-Wextern-c-compat]
          struct {
          ^
/var/folders/ds/2v9832g575jblpl14n7p3nxh0000gn/T/konan_temp8731364866561395231/api.cpp:83:11: warning: empty struct has size 0 in C, size 1 in C++ [-Wextern-c-compat]
          struct {
          ^
/var/folders/ds/2v9832g575jblpl14n7p3nxh0000gn/T/konan_temp8731364866561395231/api.cpp:85:11: warning: empty struct has size 0 in C, size 1 in C++ [-Wextern-c-compat]
          struct {
          ^
3 warnings generated.
Copy code
/Users/vincent/.konan/dependencies/target-toolchain-1-osx-android_ndk/bin/x86_64-linux-android-ld: error: /var/folders/ds/2v9832g575jblpl14n7p3nxh0000gn/T/konan_temp2487820770479561963/result.o: requires dynamic R_X86_64_PC32 reloc against 'Kotlin_initRuntimeIfNeeded' which may overflow at runtime; recompile with -fPIC
.......
.......
> Task :linkReleaseSharedAndroidNativeX64 FAILED