skyfox83
skyfox83

Reputation: 41

No resource found that matches the given name (at 'networkSecurityConfig' with value '@xml/network_security_config')

I'm beginner developer in ionic. I tried to "ionic cordova run android --device" command to run app on my phone.

fell into error below ('sample' is my project.)

:processDebugResources /Users/xxx/sample/platforms/android/res/xml/config.xml:33:53-81: AAPT: No resource found that matches the given name (at 'networkSecurityConfig' with value '@xml/network_security_config'). /Users/xxx/sample/platforms/android/build/intermediates/res/merged/debug/xml/config.xml:33: error: Error: No resource found that matches the given name (at 'networkSecurityConfig' with value '@xml/network_security_config').

so, I did below action.

  1. edit config.xml file to set real AndroidManifest.xml location. (app/src/main/AndroidManifest.xml -> AndroidManfest.xml)
  1. in my AndoridManifest.xml set minSdkVersion="16" and targetSdkVersion="26".

Any help would be appreciated. :)

PS) ionic info is...

cli packages: (/usr/local/lib/node_modules)

@ionic/cli-utils  : 1.19.2
ionic (Ionic CLI) : 3.20.0

global packages:

cordova (Cordova CLI) : 7.1.0 

local packages:

@ionic/app-scripts : 3.2.4
Cordova Platforms  : android 6.3.0 ios 4.5.5
Ionic Framework    : ionic-angular 3.9.9

System:

Node  : v6.11.3
npm   : 3.10.10 
OS    : macOS
Xcode : Xcode 12.4 Build version 12D4e 

Upvotes: 0

Views: 1203

Answers (1)

skyfox83
skyfox83

Reputation: 41

it solved by edit config.xml file like this:

target="app/src/main/res/xml/network_security_config.xml" -> target="res/xml/network_security_config.xml"

Upvotes: 4

Related Questions