Skip to content

Commit

Permalink
Moved package from AndroidManifest.xml into build.gradle namespace (#…
Browse files Browse the repository at this point in the history
…5541)

Summary:
This is necessary because Google requires this in AGP version 8.

The code no longer works now that we're at version 8 of AGP. This is because AGP 8 requires that the package be changed to a namespace option in build.gradle.

## Changelog

The React Native module now works with Android Gradle Plugin version 8.

Pull Request resolved: #5541

Test Plan:
I imported this in my own React Native project, and I was getting a build failed: "Namespace not specified. Specify a namespace in the module's build file. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace."

Then I made this one change and rebuilt my project. The build worked and my app ran correctly.

Reviewed By: LukeDefeo

Differential Revision: D55419610

Pulled By: passy

fbshipit-source-id: 5646172b14ab8a4ec6b6d3ffeb3b68c44e707883
  • Loading branch information
emmanuelproulx authored and facebook-github-bot committed Jul 15, 2024
1 parent 1246c8b commit 9ad0a15
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions react-native/react-native-flipper/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def safeExtGet(prop, fallback) {
apply plugin: 'com.android.library'

android {
namespace 'com.facebook.flipper.reactnative'
compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION)
buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION)
defaultConfig {
Expand Down

0 comments on commit 9ad0a15

Please sign in to comment.