Http.get() working but not working in build(Release/Debug) in Ionic 4

前端 未结 3 905
夕颜
夕颜 2020-11-30 14:52

I am trying get data from a simple api, it works fine in ionic serve(browser) , But when i build the app http call does not work. my Code is



        
3条回答
  •  鱼传尺愫
    2020-11-30 15:18

    I am Guessing that your are getting this because of android changes its http architecture.

    to make it working on Android go to your project root folder.

    yourAppFolder > resources > android > xml > network_security_config.xml Change your network security config to blow code.

    
    
        
            
                
            
        
    
    

提交回复
热议问题