tools:replace的前缀 tools未绑定

本文详细介绍了如何在Android项目的AndroidManifest.xml文件中正确配置namespace,特别是tools namespace的使用方法,这对于开发者理解和设置应用的清单文件至关重要。

在AndroidManifest中最上方加入

xmlns:tools="http://schemas.android.com/tools"

最后如下图所示

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.ifuture.iagriculture">
还是有错 D:\AwesomeProject>npm run android > AwesomeProject@0.0.1 android > react-native run-android info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag. Jetifier found 1696 file(s) to forward-jetify. Using 12 workers... info JS server already running. info Installing the app... > Configure project :react-native-reanimated AAR for react-native-reanimated has been found D:\AwesomeProject\node_modules\react-native-reanimated\android\react-native-reanimated-68-jsc.aar > Task :app:generateDebugBuildConfig FAILED Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0. You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. See https://docs.gradle.org/7.4/userguide/command_line_interface.html#sec:command_line_warnings 8 actionable tasks: 2 executed, 6 up-to-date FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:generateDebugBuildConfig'. > Error while evaluating property 'namespace' of task ':app:generateDebugBuildConfig' > Failed to calculate the value of task ':app:generateDebugBuildConfig' property 'namespace'. > Failed to calculate the value of property 'namespace'. > org.xml.sax.SAXParseException; systemId: file:/D:/AwesomeProject/android/app/src/main/AndroidManifest.xml; lineNumber: 21; columnNumber: 48; ��Ԫ������ "service" ����������� "tools:replace" ��ǰ׺ "tools" δ�󶨡� * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 19s error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081 FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:generateDebugBuildConfig'. > Error while evaluating property 'namespace' of task ':app:generateDebugBuildConfig' > Failed to calculate the value of task ':app:generateDebugBuildConfig' property 'namespace'. > Failed to calculate the value of property 'namespace'. > org.xml.sax.SAXParseException; systemId: file:/D:/AwesomeProject/android/app/src/main/AndroidManifest.xml; lineNumber: 21; columnNumber: 48; ��Ԫ������ "service" ����������� "tools:replace" ��ǰ׺ "tools" δ�󶨡� * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 19s at makeError (D:\AwesomeProject\node_modules\execa\index.js:174:9) at D:\AwesomeProject\node_modules\execa\index.js:278:16 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async runOnAllDevices (D:\AwesomeProject\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5) at async Command.handleAction (D:\AwesomeProject\node_modules\@react-native-community\cli\build\index.js:192:9) info Run CLI with --verbose flag for more details.
最新发布
08-09
你给的<provider android:name="androidx.startup.InitializationProvider" tools:node="remove" />会让我编译错误[ 7% 1/13 11s remaining] Fix manifest: out/target/common/obj/APPS/ImStandbyServiceTests_intermediates/manifest/AndroidManifest.xml.fixed FAILED: out/target/common/obj/APPS/ImStandbyServiceTests_intermediates/manifest/AndroidManifest.xml.fixed /bin/bash -c "(echo android.test.base android.test.mock androidx.window.extensions androidx.window.sidecar | tr ' ' '\\n' > out/target/common/obj/APPS/ImStandbyServiceTests_intermediates/exported-sdk-libs.optional ) && (out/host/linux-x86/bin/manifest_fixer --minSdkVersion 35 --targetSdkVersion 35 --raise-min-sdk-version --uses-non-sdk-api --extract-native-libs=false \$(cat out/target/common/obj/APPS/ImStandbyServiceTests_intermediates/exported-sdk-libs | grep -v -f out/target/common/obj/APPS/ImStandbyServiceTests_intermediates/exported-sdk-libs.optional | sort -u | sed -e 's/^/\\ --uses-library\\ /' | tr '\\n' ' ') \$(cat out/target/common/obj/APPS/ImStandbyServiceTests_intermediates/exported-sdk-libs | grep -f out/target/common/obj/APPS/ImStandbyServiceTests_intermediates/exported-sdk-libs.optional | sort -u | sed -e 's/^/\\ --optional-uses-library\\ /' | tr '\\n' ' ') vendor/huanglong/packages/ImStandbyService/source/app/src/main/../test/AndroidManifest.xml out/target/common/obj/APPS/ImStandbyServiceTests_intermediates/manifest/AndroidManifest.xml.fixed ) && (rm out/target/common/obj/APPS/ImStandbyServiceTests_intermediates/exported-sdk-libs.optional )" error: unbound prefix: line 24, column 8 10:52:36 ninja failed with: exit status 1
07-31
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

猎羽

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值