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 build breaks due to the release of androidx.browser:browser:1.6.0-beta01 on June 22th #423

Open
xseignard opened this issue Jun 23, 2023 · 9 comments

Comments

@xseignard
Copy link

Which platform(s) does your issue occur on?

  • Android

Please, provide the following version numbers that your issue occurs with:

Please, tell us how to recreate the issue in as much detail as possible.

Build on android

How to fix?

Add a androidXBrowser = "1.5.0" in your project android/build.gradle:

buildscript {
    ext {
        // ...
        androidXBrowser = "1.5.0"

It already happened before

See this issue: #386

See this issue: #298

A more robust solution (e.g. fixed version instead of 1.+) would be great

It happens all the time...

@xseignard xseignard changed the title Android build breaks due to the release of androidx.browser:browser:1.5.0-alpha01 on June 22th Android build breaks due to the release of androidx.browser:browser:1.6.0-beta01 on June 22th Jun 23, 2023
jennieandersson added a commit to jennieandersson/react-native-inappbrowser that referenced this issue Jun 26, 2023
@SophieJung7
Copy link

Can you guys fix this asap? Don't want to change android/build.gradle file...:(

@hbel
Copy link

hbel commented Jul 6, 2023

FYI, for those of you using Expo, I think I have found (a quite hacky) workaround to be able to at least build your android binaries locally again (without ejecting your whole project).

You can (of course) edit the gradle file as given in PR #424 to use version 1.5.0, locally, but since metro is running yarn install by itself when building with eas build --local, it will not be enough to make if you only do so in your local node_modules. You also have to change the file in yarn's cache directory, too. After that (and maybe clearing your gradle caches, too), you should be able to build again (until you clear yarn's cache, of course). At least, that worked for me.

@xseignard
Copy link
Author

please don't use @hbel solution 😬

rely on a custom dev client (see: https://docs.expo.dev/develop/development-builds/introduction/)

and use a custom plugin to change androidXBrowser in the ext, you can have a look at this one https://github.com/transistorsoft/expo-gradle-ext-vars

@hbel
Copy link

hbel commented Jul 7, 2023

I'm terribly sorry for causing that confusion. I actually tried to set the ext vars first, but seemed to have not cleared all the caches, so it did not work. I can confirm that this solution works - tried it in several projects.

@HiveForensicsAI
Copy link

HiveForensicsAI commented Jul 14, 2023

I got it to work very simply it took me a few hours of trying different solutions but ultimately my solution was solved by adding the plugins to the app.json for my expo project also making sure to format it correctly and install vars this solution was recommended already previously so this is nothing new

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

@krini
Copy link

krini commented Aug 28, 2023

My app still crashes though I added androidXBrowser = "1.5.0" in android/build.gradle file.
Do I need to do something else?
I'm using
"react-native-inappbrowser-reborn": "^3.7.0"
"react-native": "0.71.13",

@esbenvb
Copy link

esbenvb commented Sep 27, 2023

My app still crashes though I added androidXBrowser = "1.5.0" in android/build.gradle file. Do I need to do something else? I'm using "react-native-inappbrowser-reborn": "^3.7.0" "react-native": "0.71.13",

In android/app/build.gradle add this:

configurations.all {
   resolutionStrategy {
    force 'androidx.browser:browser:1.5.0'
   }
}

@martinsotirov
Copy link

I got it to work very simply it took me a few hours of trying different solutions but ultimately my solution was solved by adding the plugins to the app.json for my expo project also making sure to format it correctly and install vars this solution was recommended already previously so this is nothing new

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

This turned out to be the correct answer for our case.

@jamesleeht
Copy link

The current build seems to set the version as: androidx.browser:browser:1.8.0-alpha01.

expo-gradle-ext-vars solution does not seem to work as intended anymore.

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

Successfully merging a pull request may close this issue.

8 participants