Skip to content

Commit 1f143e8

Browse files
cortinicofacebook-github-bot
authored andcommitted
Sets the namespace via Gradle and not via AndroidManifest (#35094)
Summary: Pull Request resolved: #35094 Currently the build on console is firing this warning: ``` > Task :app:processDebugMainManifest package="com.androidtemplateproject" found in source AndroidManifest.xml: /tmp/AndroidTemplateProject/android/app/src/main/AndroidManifest.xml. Setting the namespace via a source AndroidManifest.xml's package attribute is deprecated. Please instead set the namespace (or testNamespace) in the module's build.gradle file, as described here: https://developer.android.com/studio/build/configure-app-module#set-namespace This migration can be done automatically using the AGP Upgrade Assistant, please refer to https://developer.android.com/studio/build/agp-upgrade-assistant for more information. ``` This diff fixes it so users won't see it anymore on 0.71 Changelog: [Android] [Fixed] - Sets the namespace via Gradle and not via AndroidManifest Reviewed By: cipolleschi Differential Revision: D40724654 fbshipit-source-id: 9a059a3619158ad13c66f87b6ed7d4ab4886ad8a
1 parent 76f7084 commit 1f143e8

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

packages/rn-tester/android/app/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ def reactNativeArchitectures() {
8888
android {
8989
buildToolsVersion = "31.0.0"
9090
compileSdkVersion 31
91+
namespace "com.facebook.react.uiapp"
9192

9293
// Used to override the NDK path/version on internal CI or by allowing
9394
// users to customize the NDK path/version from their root project (e.g. for M1 support)

packages/rn-tester/android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest
3-
xmlns:android="http://schemas.android.com/apk/res/android"
4-
package="com.facebook.react.uiapp">
3+
xmlns:android="http://schemas.android.com/apk/res/android">
54

65
<uses-feature
76
android:name="android.software.leanback"

template/android/app/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ android {
9393

9494
compileSdkVersion rootProject.ext.compileSdkVersion
9595

96+
namespace "com.helloworld"
9697
defaultConfig {
9798
applicationId "com.helloworld"
9899
minSdkVersion rootProject.ext.minSdkVersion

template/android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.helloworld">
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
32

43
<uses-permission android:name="android.permission.INTERNET" />
54

0 commit comments

Comments
 (0)