Skip to content

React Native Android build fails with "package com.facebook.react.common.annotations.internal.LegacyArchitectureLogger; does not exist" on React Native 0.78 #2676

Open
@ChinmayLale

Description

@ChinmayLale

React Native Android build fails with "package com.facebook.react.common.annotations.internal does not exist" on React Native 0.78

I'm encountering a build failure when running yarn android for my React Native project (RN 0.78). The error occurs during :app:compileDebugJavaWithJavac and seems related to autogenerated New Architecture files. iOS builds work fine.

Error Snippet:

/Users/socon/Documents/Chinmay/socon-mobile/android/app/build/generated/autolinking/src/main/java/com/facebook/react/ReactNativeApplicationEntryPoint.java:8: error: package com.facebook.react.common.annotations.internal does not exist import com.facebook.react.common.annotations.internal.LegacyArchitectureLogger;

What I've tried:

  1. ./gradlew clean (succeeds but doesn't resolve)
  2. ./gradlew build fails with same error
  3. Toggled newArchEnabled in gradle.properties (both true/false)
  4. Cleared all caches (yarn cache clean, ./gradlew clean, deleted node_modules, android/.gradle, android/build)
  5. Verified React Native doctor (npx react-native doctor shows no issues)

Environment:

  • React Native: 0.78.0
  • React: 19.0.0
  • Vision Camera: 4.6.4
  • Gradle: 8.12 (with JDK 17)

Relevant package.json Dependencies:

"dependencies": { "react": "19.0.0", "react-native": "0.78.0", "react-native-vision-camera": "^4.6.4", "react-native-worklets-core": "^1.5.0", "react-native-reanimated": "3.18.0" }, "devDependencies": { "@react-native-community/cli": "15.0.1", "@react-native/babel-preset": "0.78.0" }

Question:
How can I resolve this missing package error related to New Architecture autogenerated files? Specifically:
Are there known solutions for the LegacyArchitectureLogger import failure in autogenerated code?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions