Build Failed when ionic cordova run android


I get error while run android , please Help !!.


Hi, @Firsya
Add the following lines to your platforms/android/build.gradle

  configurations.all {
        resolutionStrategy {
            force ''

if still having issue try running this command:

cordova plugin add cordova-android-support-gradle-release --fetch

Hi @addwebsolution thank u for your respon,

i have try your solutions, but there is still getting error when ionic cordova run android

Note: Recompile with -Xlint:deprecation for details.
D:\Mobile\Dev\myapp\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’).

D:\Mobile\Dev\myapp\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’).

FAILURE: Build failed with an exception.


have you tried both the solutions?


yes , i try both solutions but still getting error


Please fire these commands first and then try to build app may be your problem can be solved by doing this:

cordova platform rm android
cordova platform add android

Hi I try to add network_security_config.xml in platforms\android\build\intermediates\res\merged\debug\xml

<?xml version="1.0" encoding="utf-8"?>

its works for me, but i dont know what effect it has