diff --git a/android/gradle.properties b/android/gradle.properties deleted file mode 100644 index 3fe8768..0000000 --- a/android/gradle.properties +++ /dev/null @@ -1,5 +0,0 @@ -StepCounter_compileSdkVersion=36 -StepCounter_kotlinVersion=2.0.21 -StepCounter_targetSdkVersion=36 -StepCounter_minSdkVersion=24 -StepCounter_ndkVersion=27.1.12297006 diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 3444555..062d12d 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -1,5 +1,12 @@ apply plugin: "com.android.application" -apply plugin: "org.jetbrains.kotlin.android" +// AGP 9 ships built-in Kotlin support and registers the `kotlin` extension +// itself. Applying the Kotlin plugin on top of it fails configuration with +// "Cannot add extension with name 'kotlin'". Only apply it when nothing has +// registered that extension yet. +if (project.extensions.findByName('kotlin') == null) { + apply plugin: "org.jetbrains.kotlin.android" +} + apply plugin: "com.facebook.react" /**