Cordova(Ionic)で「No resource found that matches the given name (at ‘networkSecurityConfig’ with value 」エラーが出た場合の解決方法について紹介します。
## 【エラー解消手順】No toolchains found~
Cordova(Ionic)でアプリをビルドした場合に以下のエラーが出ることがあります。
xxxx\platforms\android\res\xml\config.xml:34:53-81: AAPT: No resource found that matches the given name (at 'networkSecurityConfig' with value '@xml/network_security_config')
その場合は、config.xmlの一部を以下のように修正することでエラーが解消されました。
<edit-config file="AndroidManifest.xml" mode="merge" target="/manifest/application" xmlns:android="http://schemas.android.com/apk/res/android"> <application android:networkSecurityConfig="@xml/network_security_config" /> </edit-config> <resource-file src="resources/android/xml/network_security_config.xml" target="res/xml/network_security_config.xml" />
– | 関連記事 |
---|---|
1 | ■【Ionic入門】Android・iOS・Windowsアプリ開発編 |
2 | ■【Node.js入門】サンプル集と使い方まとめ |
3 | ■【Cordova入門】Android向けハイブリッドアプリの開発 |
コメント