Home > Net >  Ionic 5 capacitor Connection error: net::ERR_CONNECTION_REFUSED
Ionic 5 capacitor Connection error: net::ERR_CONNECTION_REFUSED

Time:12-25

I have already created a new project on ionic 5 capacitor.

During build is giving issues on API and plugins. Have turned from localhost to private IP and the same issue.

img1

Have tried below steps for a build and also debug with andorid studio and same thing.

ionic build --prod
npx cap sync
 npx cap open android

npm run build --prod
npx cap copy
npx cap open android

ionic capacitor run android  --prod --release
ionic capacitor sync android
ionic capacitor run android -l --external --adress 
ionic  capacitor run android --no-sync --target Pixel_3_API_30

On android studio have modified the fiiles of AndroidManifest to allow trafic config.xml to allow all origins, alos @xml file

CodePudding user response:

npm run ng build – --configuration production
npx cap copy
npx cap open android

  • Related