Skip to content

Commit 15c8fcb

Browse files
committed
fix: android example app build
Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
1 parent c74641f commit 15c8fcb

3 files changed

Lines changed: 4 additions & 15 deletions

File tree

android/build.gradle

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ buildscript {
1212
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${safeExtGet('kotlinVersion')}")
1313
classpath("com.android.tools.build:gradle:7.0.4")
1414
}
15-
ext.kotlinVersion = "${safeExtGet('kotlinVersion')}"
1615
}
1716

1817
def getExtOrIntegerDefault(prop) {
@@ -59,6 +58,9 @@ apply plugin: 'kotlin-android'
5958
android {
6059
if (supportsNamespace()) {
6160
namespace "com.reactnativecommunity.webview"
61+
buildFeatures {
62+
buildConfig true
63+
}
6264

6365
sourceSets {
6466
main {
@@ -106,13 +108,3 @@ dependencies {
106108
implementation "org.jetbrains.kotlin:kotlin-stdlib:${safeExtGet('kotlinVersion')}"
107109
implementation "androidx.webkit:webkit:${safeExtGet('webkitVersion')}"
108110
}
109-
110-
if (isNewArchitectureEnabled()) {
111-
react {
112-
jsRootDir = file("../src/")
113-
libraryName = "rncwebview"
114-
codegenJavaPackageName = "com.reactnativecommunity.webview"
115-
codegenDir = new File(codegenPath)
116-
reactNativeDir = new File(reactNativePath)
117-
}
118-
}

example/android/build.gradle

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,8 @@ buildscript {
88
}
99

1010
dependencies {
11-
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.0")
12-
classpath("com.android.tools.build:gradle:7.0.4")
1311
getReactNativeDependencies().each { dependency ->
1412
classpath(dependency)
1513
}
1614
}
17-
ext.kotlinVersion = "1.6.0"
1815
}

example/android/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ newArchEnabled=false
4242
#ANDROID_NDK_VERSION=21.4.7075529
4343

4444
# Version of Kotlin to build against.
45-
KOTLIN_VERSION=1.6.0
45+
# KOTLIN_VERSION=1.6.0

0 commit comments

Comments
 (0)