gpt4 book ai didi

android - Nativescript 套接字连接超时

转载 作者:行者123 更新时间:2023-11-29 23:28:16 32 4
gpt4 key购买 nike

最近我开始遇到 Nativescript 的一个奇怪问题。当我尝试使用 tns run android 运行 android 应用程序时,我收到以下错误消息

无法在设备上应用更改:HQ64MZ576132。错误是:套接字连接超时..

我不知道如何确定实际问题。要解决这个问题,我需要从另一个工作的 nativescript 应用程序复制 app 文件夹,然后替换存储库中的所有文件,最终我回到正常运行的应用程序。以下是我想弄清楚的内容:

  1. 如何确定导致套接字连接超时的原因?
  2. 为什么即使文件完全正确,替换整个应用程序也能解决问题哪个对我来说没有意义?

以下是我的package.json

{
"description": "NativeScript Application",
"license": "SEE LICENSE IN <your-license-filename>",
"readme": "NativeScript Application",
"repository": "<fill-your-repository-here>",
"nativescript": {
"id": "com.travel",
"tns-android": {
"version": "5.0.0"
}
},
"scripts": {
"lint": "tslint \"app/**/*.ts\""
},
"dependencies": {
"nativescript-admob": "^1.4.2",
"nativescript-appversion": "^1.4.1",
"nativescript-exit": "^1.0.1",
"nativescript-grid-view": "^3.4.0",
"nativescript-purchase": "^2.0.5",
"nativescript-social-share": "^1.5.0",
"nativescript-theme-core": "1.0.4",
"nativescript-toast": "^1.4.6",
"nativescript-ui-chart": "^3.8.0",
"nativescript-ui-sidedrawer": "^3.5.1",
"rxjs": "5.5.2",
"tns-core-modules": "^5.0.0"
},
"devDependencies": {
"awesome-typescript-loader": "~3.1.3",
"babel-traverse": "6.4.5",
"babel-types": "6.4.5",
"babylon": "6.4.5",
"copy-webpack-plugin": "~4.3.0",
"css-loader": "^0.28.11",
"extract-text-webpack-plugin": "~3.0.2",
"lazy": "1.0.11",
"nativescript-dev-sass": "1.3.5",
"nativescript-dev-typescript": "0.5.1",
"nativescript-dev-webpack": "^0.16.2",
"nativescript-worker-loader": "~0.8.1",
"raw-loader": "~0.5.1",
"resolve-url-loader": "~2.2.1",
"sass-loader": "^6.0.7",
"tns-platform-declarations": "^4.2.0",
"tslint": "5.8.0",
"typescript": "2.8.4",
"uglifyjs-webpack-plugin": "~1.1.6",
"webpack": "^3.12.0",
"webpack-bundle-analyzer": "^2.13.1",
"webpack-sources": "~1.1.0"
}
}

谢谢

最佳答案

这是一个困扰我大部分时间的讨厌问题。这是导致应用程序中断的 nativescript-admob 插件。版本 17.0.0 的 Google 移动广告 SDK 需要 AndroidManifest.xml 中的标记。您可以在此处找到更多信息 https://developers.google.com/admob/android/quick-start#update_your_androidmanifestxml .有 Unresolved 问题 https://github.com/EddyVerbruggen/nativescript-admob/issues/45它有温度。您必须将以下行添加到 AndroidManifest.xml

<application>
<!-- this line needs to be added (replace the value!) -->
<meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="ca-app-pub-3940256099942544~3347511713" />

<activity></activity>
</application>

关于android - Nativescript 套接字连接超时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53134843/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com