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

Error: Activity class does not exist & Could not find dependency com.facebook.react:react-native:0.78.0 #49804

Open
meriem-majdoul opened this issue Mar 4, 2025 · 5 comments
Labels
Needs: Attention Issues where the author has responded to feedback. Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue.

Comments

@meriem-majdoul
Copy link

Description

Hello,
I'm experiencing two issues when trying to run my React Native app on Android. Here are the details:

Issue 1: Activity class does not exist
When I execute npx react-native run-android, I get the following error:
info Starting the app on "RZ8W90J1ZZE"... Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.synergys/.MainActivity } Error type 3 Error: Activity class {com.synergys/com.synergys.MainActivity} does not exist.
Issue 2: Dependency not found
When I try to build the app in Android Studio, I get this error:
`Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.

Could not resolve all dependencies for configuration ':app:debugCompileClasspath'.
Could not find com.facebook.react:react-native:0.78.0.
Required by:
project :app

Possible solution:

Steps to reproduce

1- Verified that the React Native version in package.json is 0.78.0.
2- Added the necessary repositories in android/build.gradle:
allprojects { repositories { mavenCentral() google() maven { url 'https://repo.maven.apache.org/maven2/' } maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' } } }
3- Ran the following commands to clean and rebuild:

cd android
./gradlew clean
./gradlew build

4- Verified that MainActivity.java exists in android/app/src/main/java/com/synergys/.

React Native Version

0.78.0

Affected Platforms

Build - Windows

Output of npx @react-native-community/cli info

System:
  OS: Windows 10 10.0.19045
  CPU: (4) x64 Intel(R) Core(TM) i5-3427U CPU @ 1.80GHz
  Memory: 8.87 GB / 15.87 GB
Binaries:
  Node:
    version: 22.13.1
    path: C:\nvm4w\nodejs\node.EXE
  Yarn:
    version: 1.22.19
    path: ~\AppData\Roaming\npm\yarn.CMD
  npm:
    version: 10.9.2
    path: C:\nvm4w\nodejs\npm.CMD
  Watchman: Not Found
SDKs:
  Android SDK:
    API Levels:
      - "28"
      - "29"
      - "30"
      - "31"
      - "32"
      - "33"
      - "34"
      - "35"
    Build Tools:
      - 29.0.2
      - 30.0.2
      - 30.0.3
      - 31.0.0
      - 33.0.1
      - 33.0.2
      - 34.0.0
      - 35.0.0
    System Images:
      - android-28 | Google Play Intel x86 Atom
    Android NDK: Not Found
  Windows SDK: Not Found
IDEs:
  Android Studio: AI-242.23726.103.2422.12816248
  Visual Studio: Not Found
Languages:
  Java: 17.0.12
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli":
    installed: 15.0.1
    wanted: 15.0.1
  react:
    installed: 19.0.0
    wanted: ^19.0.0
  react-native:
    installed: 0.78.0
    wanted: ^0.78.0
  react-native-windows: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: false
  newArchEnabled: true
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

npm notice
npm notice New major version of npm available! 10.9.2 -> 11.1.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.1.0
npm notice To update run: npm install -g [email protected]
npm notice

Stacktrace or Logs

Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not resolve all dependencies for configuration ':app:debugCompileClasspath'.
   > Could not find com.facebook.react:react-native:0.78.0.
     Required by:
         project :app

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

Reproducer

https://github.com/meriem-majdoul/Siamtec

Screenshots and Videos

No response

@sarthak-d11
Copy link
Collaborator

Hey @meriem-majdoul , I am unable to access you reproducer which you have shared(https://github.com/meriem-majdoul/Siamtec). It will be great if you can share a valid reproducer

@cipolleschi
Copy link
Contributor

The reproducer does not exists.

Can you check if everything works fine in a completely new app?

npx @react-native-community/cli init NewApp --version 0.78.0

@sarthak-d11 sarthak-d11 added Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. and removed Needs: Triage 🔍 labels Mar 4, 2025
@react-native-bot
Copy link
Collaborator

Warning

Missing reproducer: We could not detect a reproducible example in your issue report. Please provide either:

@meriem-majdoul
Copy link
Author

@sarthak-d11 , @cipolleschi Hello, the reproducer is now available. You can access it via the following link: https://github.com/meriem-majdoul/Siamtec. Feel free to share your feedback or questions. Thank you!

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Mar 6, 2025
@cipolleschi
Copy link
Contributor

@meriem-majdoul I see that the reproducer uses Firebase. It could be hard for us to test it with firebase involved, because we would need a firebase key. Is firebase necessary to trigger the issue? If not, can you remove it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Attention Issues where the author has responded to feedback. Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue.
Projects
None yet
Development

No branches or pull requests

4 participants