diff --git a/packages/react-native/ReactAndroid/build.gradle.kts b/packages/react-native/ReactAndroid/build.gradle.kts index e716449c0a1..c54d33087a4 100644 --- a/packages/react-native/ReactAndroid/build.gradle.kts +++ b/packages/react-native/ReactAndroid/build.gradle.kts @@ -769,6 +769,9 @@ dependencies { compileOnly(project(":packages:react-native:ReactAndroid:hermes-engine")) implementation(libs.androidx.collection) + // Fresco reads a HEIF's EXIF orientation through ExifInterface but doesn't + // declare it, so without it the first HEIC image throws NoClassDefFoundError + implementation(libs.androidx.exifinterface) testImplementation(libs.junit) testImplementation(libs.assertj) diff --git a/packages/react-native/gradle/libs.versions.toml b/packages/react-native/gradle/libs.versions.toml index a87f94f4e29..4bb40034c83 100644 --- a/packages/react-native/gradle/libs.versions.toml +++ b/packages/react-native/gradle/libs.versions.toml @@ -12,6 +12,7 @@ androidx-annotation = "1.6.0" androidx-appcompat = "1.7.0" androidx-autofill = "1.3.0" androidx-collection = "1.4.4" +androidx-exifinterface = "1.4.2" androidx-benchmark-macro-junit4 = "1.3.3" androidx-profileinstaller = "1.4.1" androidx-swiperefreshlayout = "1.1.0" @@ -60,6 +61,7 @@ androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "a androidx-appcompat-resources = { module = "androidx.appcompat:appcompat-resources", version.ref = "androidx-appcompat" } androidx-autofill = { module = "androidx.autofill:autofill", version.ref = "androidx-autofill" } androidx-collection = { module = "androidx.collection:collection", version.ref = "androidx-collection" } +androidx-exifinterface = { module = "androidx.exifinterface:exifinterface", version.ref = "androidx-exifinterface" } androidx-benchmark-macro-junit4 = { group = "androidx.benchmark", name = "benchmark-macro-junit4", version.ref = "androidx-benchmark-macro-junit4" } androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espresso-core" } androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "androidx-test-junit" }