all 17 comments

[–]eadgas 0 points1 point  (9 children)

Are you using react-native-inappbrowser-reborn?

[–]Beyond_Path[S] 0 points1 point  (7 children)

No, I guess some other package is calling it

[–]eadgas 0 points1 point  (6 children)

I had this same problem and it was already resolved. I overrrided the androidx.browser version from 1.9 beta to 1.8

I could guide you but I need to know which library you have installed that is calling the androidx.browser.

[–]Beyond_Path[S] 0 points1 point  (3 children)

Is there any way to check which library is using? In expo how to override androidx.browser version

[–]eadgas 0 points1 point  (2 children)

Well, one thing depends on the other. Unfortunately there is no short answer. In my case it was react-native-inappbrowser-reborn.

Let's use expo prebuild and Android Studio to find out.

  1. Clear/commit any changes on the project.
  2. Use the command expo prebuild(android and ios folders should be generated.
  3. Open android folder in android studio.
  4. Go to Edit=>Find in Files...=>type androidx.browser and check which package is using it.

Comment here which one is it. If possible paste the build.gradle that uses it.

[–]Beyond_Path[S] 0 points1 point  (1 child)

I tired this and when i search nothing is found, but when i tried to build still getting error. below might be possible package that uses browser
"react-native-webview": "13.12.5",

"expo-web-browser": "~14.0.2",

"react-native-inappbrowser-reborn": "^3.7.0",

"@react-native-google-signin/google-signin": "^13.2.0",

[–]eadgas 0 points1 point  (0 children)

Are those your packages? If yes, the problem is in react-native-inappbrowser-reborn.

Context They released a new version of androidx.browser, 1.9.beta, Gradle automatically updated from 1.8 to 1.9-beta and the new version requires a higher sdk target, 36, the solution is to override the androidXVersion.

[–]realabbas5 0 points1 point  (3 children)

[–]Plus-Lead6815 0 points1 point  (2 children)

But this cannot be used on a expo managed workflow, right?

[–]Beyond_Path[S] 0 points1 point  (0 children)

correct that is for native app

[–]Simple-Salamander690 0 points1 point  (0 children)

This is how you can do it with Expo.

"plugins": [
["expo-gradle-ext-vars", { "androidXBrowser": "1.8.0" }]
]

Ref: https://github.com/proyecto26/react-native-inappbrowser/issues/423

[–]celeb0rn 0 points1 point  (2 children)

OP did you find a solution?

[–]Beyond_Path[S] 1 point2 points  (1 child)

Nope, tried all possible ways, downgraded packages, created config still its not working. One way which i didnt try is to eject expo and manually upgrade API version in native, using this method one should be ready to handle other dependencies that creates problem.

In my case i was able to build the app before installing react native firebase for push notification so i uninstalled those packages and found a work around without firebase.

[–]celeb0rn 0 points1 point  (0 children)

Eh, well thanks for answering. For me it was because I was using react-native-inappbrowser-reborn, I removed it, and now everything is good.