You can't specify targetSdkVersion > compileSdkVersion. Because essentially targetSdkVersion says that I support this version, but for there to be real support it must be compiled with the corresponding version of compileSdkVersion
is it necessary to upgrade expo? generally no, although this is rather a desirable path. I specifically got one error compiling Kotlin in expo-modules-core:compileReleaseKotlin, I fixed it directly in node_modules and everything compiled fine
I had an error in this file node_modules/expo-modules-core/android/src/main/java/expo/modules/adapters/react/permissions/PermissionsService.kt
and replaced a piece of code from:
override fun isPermissionPresentInManifest(permission: String): Boolean {
try {
context.packageManager.getPackageInfo(context.packageName, PackageManager.GET_PERMISSIONS)?.run {
return requestedPermissions.contains(permission)
}
return false
} catch (e: PackageManager.NameNotFoundException) {
return false
}
}
to:
override fun isPermissionPresentInManifest(permission: String): Boolean {
try {
val packageInfo = context.packageManager.getPackageInfo(
context.packageName,
PackageManager.GET_PERMISSIONS
)
return packageInfo?.requestedPermissions?.contains(permission) ?: false
} catch (e: PackageManager.NameNotFoundException) {
return false
}
}