proyecto26 / react-native-inappbrowser

📱InAppBrowser for React Native (Android & iOS) 🤘
https://www.npmjs.com/package/react-native-inappbrowser-reborn
MIT License
1.29k stars 218 forks source link

Namespace in AndroidManifest no longer supported #451

Open isitcrazythough opened 5 months ago

isitcrazythough commented 5 months ago

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.

Compiling react native android version is impossible due to the following error:

Setting the namespace via the package attribute in the source AndroidManifest.xml is no longer supported. Recommendation: remove package="com.proyecto26.inappbrowser" from the source AndroidManifest.xml.

Reproduce by having the specified react native and gradle versions and trying to run the app with the inappbrowser module. It seems that specifying the package in the android manifest instead of a build file is deprecated, so compiling apps with newer react native versions is impossible.

isitcrazythough commented 5 months ago

Took a look at the code and it seems to be fixed in develop. Is there a reason why it's not published already, considering that the package did not receive an update for 2 years?

isitcrazythough commented 5 months ago

Guess I'll leave it open until we get an update, considering it's quite critical.

abramval commented 5 months ago

How can I get around this error while there are no fixes?

isitcrazythough commented 5 months ago

I worked around this by forcing the correct namespace for all my dependencies by specifying this in android/build.gradle

subprojects {
    beforeEvaluate {
        project ->
            if (project.hasProperty("android")) {
                android {
                    def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0].toInteger()
                    if (namespace == null && agpVersion >= 7) {
                        namespace project.group
                    }
                }
            }
    }
}
rajdeepnanua-okta commented 4 months ago

@jdnichollsc, could you publish a new release? I see that the fix for this has already been merged, and react-native 0.73 is unusable without the fix or a workaround.

gabrielnascr commented 3 months ago

any updates?

danielyooo commented 2 months ago

I do the namespace in the buil.gradle of the app. Just do: namespace = "com.proyecto26.inappbrowser" And remove the line package="com.proyecto26.inappbrowser" in the AndroidManifest