Sets the namespace via Gradle and not via AndroidManifest (#35094)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/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: 9b01748a22e9993b60e17bf25acbc68ba8e4eb77
This commit is contained in:
Родитель
ec5a4301a3
Коммит
cec9a34f6c
|
@ -88,6 +88,7 @@ def reactNativeArchitectures() {
|
|||
android {
|
||||
buildToolsVersion = "31.0.0"
|
||||
compileSdkVersion 31
|
||||
namespace "com.facebook.react.uiapp"
|
||||
|
||||
// Used to override the NDK path/version on internal CI or by allowing
|
||||
// users to customize the NDK path/version from their root project (e.g. for M1 support)
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.facebook.react.uiapp">
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<uses-feature
|
||||
android:name="android.software.leanback"
|
||||
|
|
|
@ -93,6 +93,7 @@ android {
|
|||
|
||||
compileSdkVersion rootProject.ext.compileSdkVersion
|
||||
|
||||
namespace "com.helloworld"
|
||||
defaultConfig {
|
||||
applicationId "com.helloworld"
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.helloworld">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче