React native new architecture support
It doesn’t work with the new architecture. Any fix coming?
What do you mean "doesn’t work"? Could you please discribe what exactly goes wrong?
@UraFIZ https://reactnative.directory/?search=react-native-inappbrowser
Can confirm its not working with newArchEnabled
Can somebody provide a minimal repository that shows the issue with newArchEnabled? Is the issue specific to iOS or Android? I've created two minimal react native repos for v0.75.5 and v0.76.6 and experienced no issues with the latest. Both utilizing (no bridge) / fabric / concurrentRoot
https://github.com/tristanheilman/BrowserNewArch https://github.com/tristanheilman/BrowserNewArch76
@tristanheilman Currently I am trying to upgrade my project to version 0.80 and android build is failing with the below error.
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':react-native-inappbrowser-reborn:compileDebugJavaWithJavac'.
> Could not resolve all dependencies for configuration ':react-native-inappbrowser-reborn:debugCompileClasspath'.
> Could not resolve all dependencies for configuration ':react-native-inappbrowser-reborn:debugCompileClasspath'.
> Could not find com.android.support:support-annotations:1.0.2.
Required by:
project :react-native-inappbrowser-reborn
> Could not resolve all dependencies for configuration ':react-native-inappbrowser-reborn:debugCompileClasspath'.
> Could not find com.android.support:customtabs:1.0.2.
Required by:
project :react-native-inappbrowser-reborn
* Try:
> The project declares repositories, effectively ignoring the repositories you have declared in the settings.
To determine how project repositories are declared, configure your build to fail on project repositories.
For more information, please refer to https://docs.gradle.org/8.14.1/userguide/declaring_repositories.html#sub:fail_build_on_project_repositories in the Gradle documentation.
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
BUILD FAILED in 16s
error Failed to install the app. Command failed with exit code 1: ./gradlew app:installStagingdebug -PreactNativeDevServerPort=8081 FAILURE: Build failed with an exception. * What went wrong:
Could not determine the dependencies of task ':react-native-inappbrowser-reborn:compileDebugJavaWithJavac'.
> Could not resolve all dependencies for configuration ':react-native-inappbrowser-reborn:debugCompileClasspath'. > Could not resolve all dependencies for configuration ':react-native-inappbrowser-reborn:debugCompileClasspath'. > Could not find com.android.support:support-annotations:1.0.2. Required by: project :react-native-inappbrowser-reborn > Could not resolve all dependencies for configuration ':react-native-inappbrowser-reborn:debugCompileClasspath'. > Could not find com.android.support:customtabs:1.0.2. Required by: project :react-native-inappbrowser-reborn * Try:
> The project declares repositories, effectively ignoring the repositories you have declared in the settings. To determine how project repositories are declared, configure your build to fail on project repositories. For more information, please refer to https://docs.gradle.org/8.14.1/userguide/declaring_repositories.html#sub:fail_build_on_project_repositories in the Gradle documentation.
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org. BUILD FAILED in 16s.
info Run CLI with --verbose flag for more details.
@ElChawich Can you please provide a minimal reproduction repository for React Native v0.80.0 that produces this error when building for android?
I was unable to reproduce the error in this example repo: https://github.com/tristanheilman/BrowserNewArch80
Note that AndroidX is used for RN 0.80.0 by default; check your grade.properties for this boolean flag and make sure it's set to true. Also, check your build.gradle file. I suggest setting a specific AndroidX version here OR leave it blank and upgrade your min & target SDK version to 36. This will allow your project to compile with androidX v1.9.0-alphaX by default.
thank you @tristanheilman, after upgrading my min & target SDK version to 36 it worked.
Also, when running npx expo-doctor it says: Unsupported on New Architecture: react-native-inappbrowser-reborn, but i assume that's cz of the RN directory
is that right?
Thanks for confirming 🙏 cc @tristanheilman
Though looking at @ElChawich's response above, it seems to be working for him, so I can just ignore expo doctor's warning? 🤔? (our company haven't tried yet, but we were sort of upgrading react native/expo sdk and noticed the above)
+1 for this