首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >任务执行失败:app:processDebugResources‘\ AAPT: error: resource /network未找到

任务执行失败:app:processDebugResources‘\ AAPT: error: resource /network未找到
EN

Stack Overflow用户
提问于 2022-01-20 17:38:05
回答 1查看 487关注 0票数 1

当我尝试做一个离子cordova构建android时,就会发生这种情况。

Android资源链接失败D:\blabla\platforms\android\app\build\intermediates\merged_manifests\debug\AndroidManifest.xml:22: AAPT: error: resource /(又名com.blabla.bla:xml/)未找到。

代码语言:javascript
运行
复制
> BUILD FAILED in 1s D:\blabla\platforms\android\gradlew: Command failed
> with exit code 1 Error output: FAILURE: Build failed with an
> exception.
> 
> * What went wrong: Execution failed for task ':app:processDebugResources'.
> > Android resource linking failed   D:\blabla\platforms\android\app\build\intermediates\merged_manifests\debug\AndroidManifest.xml:22:
> AAPT: error: resource xml/network_security_config (aka
> com.blabla.bla:xml/network_security_config) not found.
> 
>  
> D:\blabla\platforms\android\app\build\intermediates\merged_manifests\debug\AndroidManifest.xml:22:
> AAPT: error: resource mipmap/ic_launcher_round (aka
> com.blabla.bla:mipmap/ic_launcher_round) not found.
> 
>   error: failed processing manifest.
> 
> * 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.

我的androidManifest.xml有这个

代码语言:javascript
运行
复制
<application
    android:debuggable="true"
    android:hardwareAccelerated="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:networkSecurityConfig="@xml/network_security_config"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:supportsRtl="true"
    android:usesCleartextTraffic="true" >

我的离子信息是这样的,只使用cordova,它不能编译aab格式,也不能编译格式

代码语言:javascript
运行
复制
Ionic:

离子CLI : 6.17.1离子框架:@离子/角5.1.1 @角-devkit/构建角: 0.901.7 @角-devkit/示意图: 9.1.7 @角/cli: 9.1.7 @离子/角-工具包: 2.2.0

电容器:

电容器CLI : 2.1.2 @电容器/android:未安装@电容器/核心: 2.1.2 @电容器/ios:未安装

科多瓦:

Cordova CLI : 10.0.0 ( Cordova -lib@10.1.0) Cordova平台: android 8.1.0 cordova Plugins :cordova-plugin-离子型-键盘2.2.0,cordova-plugin-离子型-webview 5.0.0,(和5个其他插件)

效用:

cordova-res : 0.15.3本地运行: 1.5.0

系统:

Android工具: 26.1.1 NodeJS : v12.14.0 npm : 6.13.4操作系统: Windows 10

config.xml声明为

代码语言:javascript
运行
复制
<edit-config file="AndroidManifest.xml" mode="merge" target="/manifest/application" xmlns:android="http://schemas.android.com/apk/res/android">
            <application android:icon="@mipmap/ic_launcher" android:networkSecurityConfig="@xml/network_security_config" android:roundIcon="@mipmap/ic_launcher_round" android:usesCleartextTraffic="true" />
        </edit-config>
EN

回答 1

Stack Overflow用户

发布于 2022-07-03 17:17:41

对我来说,这是关于插件版本不兼容的问题,特别是Google服务,它是作为主要插件的支持插件安装的。

删除插件或降级版本解决了这个问题。

最终的解决方案(如果这确实是您的问题)是升级环境(Cordova,Node等)。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70790878

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档