Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Execution failed for task ':app:compileDebugJavaWithJavac'. #45372

Closed
iharshalm opened this issue Jul 11, 2024 · 2 comments
Closed

Execution failed for task ':app:compileDebugJavaWithJavac'. #45372

iharshalm opened this issue Jul 11, 2024 · 2 comments
Labels
Resolution: Answered When the issue is resolved with a simple answer

Comments

@iharshalm
Copy link

Description

I am upgrading my app's React Native version from 0.73.5 to 0.74.3 with the help of upgrade helper. After making changes into all required files and compiling I am encountering the following error:

/Workspace/myapp/android/app/src/main/java/com/mycompany/myapp/newarchitecture/MainApplicationReactNativeHost.java:19: error: cannot find symbol

import com.facebook.react.fabric.FabricJSIModuleProvider;
^
symbol: class FabricJSIModuleProvider
location: package com.facebook.react.fabric
/Workspace/myapp/android/app/src/main/java/com/mycompany/myapp/newarchitecture/MainApplicationReactNativeHost.java:71: error: method does not override or implement a method from a supertype
@OverRide
^
/Workspace/myapp/android/app/src/main/java/com/mycompany/myapp/newarchitecture/MainApplicationReactNativeHost.java:90: error: type argument UIManager is not within bounds of type-variable T
public JSIModuleProvider getJSIModuleProvider() {
^
where T is a type-variable:
T extends JSIModule declared in interface JSIModuleProvider
/Workspace/myapp/android/app/src/main/java/com/mycompany/myapp/newarchitecture/MainApplicationReactNativeHost.java:105: error: cannot find symbol
return new FabricJSIModuleProvider(
^
symbol: class FabricJSIModuleProvider
4 errors

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:compileDebugJavaWithJavac'.

Steps to reproduce

npm install
npx react-native run-android

React Native Version

0.74.3

Affected Platforms

Runtime - Android, Build - MacOS

Output of npx react-native info

System:
  OS: macOS 14.3.1
  CPU: (8) x64 Apple M1 Pro
  Memory: 23.36 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.14.2
    path: ~/.nvm/versions/node/v18.14.2/bin/node
  Yarn:
    version: 1.22.19
    path: /opt/homebrew/bin/yarn
  npm:
    version: 9.5.0
    path: ~/.nvm/versions/node/v18.14.2/bin/npm
  Watchman:
    version: 2024.04.15.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.14.3
    path: /Users/harshalmorey/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.2
      - iOS 17.2
      - macOS 14.2
      - tvOS 17.2
      - visionOS 1.0
      - watchOS 10.2
  Android SDK:
    API Levels:
      - "28"
      - "29"
      - "30"
      - "31"
      - "32"
      - "33"
      - "33"
      - "34"
    Build Tools:
      - 27.0.3
      - 28.0.3
      - 29.0.2
      - 29.0.3
      - 30.0.3
      - 31.0.0
      - 33.0.0
      - 33.0.1
      - 33.0.2
      - 34.0.0
    System Images:
      - android-28 | Google APIs ARM 64 v8a
      - android-29 | Google APIs ARM 64 v8a
      - android-30 | ARM 64 v8a
      - android-30 | Google APIs ARM 64 v8a
      - android-31 | ARM 64 v8a
      - android-31 | Google APIs ARM 64 v8a
      - android-32 | Google APIs ARM 64 v8a
      - android-33 | Google APIs ARM 64 v8a
      - android-34 | Google APIs ARM 64 v8a
      - android-34 | Google Play ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2024.1 AI-241.15989.150.2411.11948838
  Xcode:
    version: 15.2/15C500b
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.10
    path: /usr/bin/javac
  Ruby:
    version: 2.7.5
    path: /Users/harshalmorey/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.74.3
    wanted: 0.74.3
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

Stacktrace or Logs

/Workspace/myapp/android/app/src/main/java/com/mycompany/myapp/newarchitecture/MainApplicationReactNativeHost.java:19: error: cannot find symbol

import com.facebook.react.fabric.FabricJSIModuleProvider;
                                ^
  symbol:   class FabricJSIModuleProvider
  location: package com.facebook.react.fabric
/Workspace/myapp/android/app/src/main/java/com/mycompany/myapp/newarchitecture/MainApplicationReactNativeHost.java:71: error: method does not override or implement a method from a supertype
  @Override
  ^
/Workspace/myapp/android/app/src/main/java/com/mycompany/myapp/newarchitecture/MainApplicationReactNativeHost.java:90: error: type argument UIManager is not within bounds of type-variable T
              public JSIModuleProvider<UIManager> getJSIModuleProvider() {
                                       ^
  where T is a type-variable:
    T extends JSIModule declared in interface JSIModuleProvider
/Workspace/myapp/android/app/src/main/java/com/mycompany/myapp/newarchitecture/MainApplicationReactNativeHost.java:105: error: cannot find symbol
                return new FabricJSIModuleProvider(
                           ^
  symbol: class FabricJSIModuleProvider
4 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.

Reproducer

no git url

Screenshots and Videos

No response

@github-actions github-actions bot added Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. labels Jul 11, 2024
Copy link

⚠️ Missing Reproducible Example
ℹ️ We could not detect a reproducible example in your issue report. Please provide either:
  • If your bug is UI related: a Snack
  • If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.

@cortinico
Copy link
Contributor

You most likely failed to upgrade.

If you upgraded correctly to 0.74, you should not even have this folder at all:

/Workspace/myapp/android/app/src/main/java/com/mycompany/myapp/newarchitecture/

Please check the upgrade helper:
https://react-native-community.github.io/upgrade-helper/

or check the 0.74 template to see how your project should look like:
https://github.com/facebook/react-native/tree/0.74-stable/packages/react-native/template

@cortinico cortinico added Resolution: Answered When the issue is resolved with a simple answer and removed Needs: Triage 🔍 Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. labels Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Answered When the issue is resolved with a simple answer
Projects
None yet
Development

No branches or pull requests

2 participants