将仿真器连接到无所不在的laravel家园

问题描述 投票:0回答:1

我有项目,它的后端使用laravel,我将其放在virtualbox机器中无所事事。我已成功从本地浏览器访问。现在,我必须构建一个从后端调用api的android应用。但它给我错误

JS: {
JS:   "headers": {
JS:     "normalizedNames": {},
JS:     "lazyUpdate": null,
JS:     "headers": {}
JS:   },
JS:   "status": 0,
JS:   "statusText": "Unknown Error",
JS:   "url": "http://izat.test:8000/api/v1/auth/login",
JS:   "ok": false,
JS:   "name": "HttpErrorResponse",
JS:   "message": "Http failure response for http://izat.test:8000/api/v1/auth/login: 0 Unknown Error",
JS:   "error": {
JS:     "originalStack": "Error: java.net.UnknownHostException: Unable to resolve host \"izat.test\": No address associated with hostname\n    at new ZoneAwareError (file:///data/data/org.nativescript.fraapp/files/app/vendor.js:91443:33)\n    at onRequestComplete (file:///data/data/org.nativescript.fraapp/files/app/vendor.js:97223:34)\n    at Object.onComplete (file:///node_modules\@nativescript\core\http\http-request\http-request.js:43:0)"
JS:   }
JS: }

btw我使用nativescript-angular构建我的android应用。我将API 27用于Android模拟器

android android-emulator nativescript nativescript-angular
1个回答
0
投票
© www.soinside.com 2019 - 2024. All rights reserved.