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

Android crashes on fresh setup using 0.75.3 #46579

Closed
jorgtz opened this issue Sep 19, 2024 · 3 comments
Closed

Android crashes on fresh setup using 0.75.3 #46579

jorgtz opened this issue Sep 19, 2024 · 3 comments

Comments

@jorgtz
Copy link

jorgtz commented Sep 19, 2024

Description

After npx @react-native-community/cli@latest init DetoxTest3 got React Native version 0.75.3 then install dependencies and finally run project on android.
The app will open and close immediately.

Doing the same process with ReactNative 0.75.2 causes no issues.
Any clue on how to fix this ?

Steps to reproduce

  1. npx @react-native-community/cli@latest init DetoxTest3
  2. yarn install
  3. yarn start
  4. Select android
  5. Android app will start and then crash

React Native Version

0.75.3

Affected Platforms

Runtime - Android

Output of npx react-native info

System:
  OS: macOS 14.6.1
  CPU: (16) arm64 Apple M3 Max
  Memory: 318.63 MB / 64.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.18.1
    path: ~/.nvm/versions/node/v18.18.1/bin/node
  Yarn:
    version: 3.6.4
    path: ~/.nvm/versions/node/v18.18.1/bin/yarn
  npm:
    version: 9.8.1
    path: ~/.nvm/versions/node/v18.18.1/bin/npm
  Watchman:
    version: 2024.08.12.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.5
      - iOS 17.5
      - macOS 14.5
      - tvOS 17.5
      - visionOS 1.2
      - watchOS 10.5
  Android SDK:
    API Levels:
      - "29"
      - "33"
      - "34"
      - "35"
    Build Tools:
      - 29.0.2
      - 30.0.3
      - 34.0.0
      - 35.0.0
    System Images:
      - android-35 | Google Play ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2024.1 AI-241.18034.62.2411.12169540
  Xcode:
    version: 15.4/15F31d
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.12
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.75.3
    wanted: 0.75.3
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

Stacktrace or Logs

FATAL EXCEPTION: main
                                                                                                    Process: com.detoxtest3, PID: 14033
                                                                                                    java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/startup/R$string;
                                                                                                    	at androidx.startup.AppInitializer.discoverAndInitialize(AppInitializer.java:216)
                                                                                                    	at androidx.startup.AppInitializer.discoverAndInitialize(AppInitializer.java:206)
                                                                                                    	at androidx.startup.InitializationProvider.onCreate(InitializationProvider.java:45)
                                                                                                    	at android.content.ContentProvider.attachInfo(ContentProvider.java:2644)
                                                                                                    	at android.content.ContentProvider.attachInfo(ContentProvider.java:2613)
                                                                                                    	at android.app.ActivityThread.installProvider(ActivityThread.java:8292)
                                                                                                    	at android.app.ActivityThread.installContentProviders(ActivityThread.java:7807)
                                                                                                    	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7488)
                                                                                                    	at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0)
                                                                                                    	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2416)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:107)
                                                                                                    	at android.os.Looper.loopOnce(Looper.java:232)
                                                                                                    	at android.os.Looper.loop(Looper.java:317)
                                                                                                    	at android.app.ActivityThread.main(ActivityThread.java:8705)
                                                                                                    	at java.lang.reflect.Method.invoke(Native Method)
                                                                                                    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
                                                                                                    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:886)
                                                                                                    Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.startup.R$string" on path: DexPathList[[zip file "/data/app/~~C1pgfbus2jLxxbDbs15rDA==/com.detoxtest3-pCtxp66TvB3RdwMepKmkqA==/base.apk"],nativeLibraryDirectories=[/data/app/~~C1pgfbus2jLxxbDbs15rDA==/com.detoxtest3-pCtxp66TvB3RdwMepKmkqA==/lib/arm64, /data/app/~~C1pgfbus2jLxxbDbs15rDA==/com.detoxtest3-pCtxp66TvB3RdwMepKmkqA==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]]
                                                                                                    	at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:259)
                                                                                                    	at java.lang.ClassLoader.loadClass(ClassLoader.java:637)
                                                                                                    	at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
                                                                                                    	... 17 more

Reproducer

https://github.com/jorgtz/detoxtest3

Screenshots and Videos

Screen.Recording.2024-09-19.at.4.42.35.p.m.mov
@react-native-bot react-native-bot added the Platform: Android Android applications. label Sep 19, 2024
@softgenicsShubham
Copy link

@jorgtz, I tried your reproducer, and it is working perfectly on my device. Has anyone else tried this?

Screen.Recording.2024-09-20.at.1.26.09.PM.mov

@cortinico
Copy link
Contributor

I also tested it and it works well for me as well. Closing then 👍

@cortinico cortinico closed this as not planned Won't fix, can't repro, duplicate, stale Sep 20, 2024
@jorgtz
Copy link
Author

jorgtz commented Sep 23, 2024

@softgenicsShubham can you please share you Output of npx react-native info ?
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants