I found that when I view Live Sample, it is working fine.
But when I implement the Sample Code on my local machine or Download the zip file and then implement, it shows unable to route addresses.
Also when I add the routeTaskUrl: "http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Network/USA/NAServer/Route"
still it shows the same error.
Please suggest and help.