在 android 流星模拟器上启动应用程序永远不会完成
Starting app on android emulator for meteor never finishes
今天我想测试 Meteor 的 android 构建是如何工作的。所以我安装了 Meteor 并根据 their instructions. Then pr. instructions from here 创建了一个测试 to-do 应用程序 我安装了 Java SDK,并确认我在安装 Visual Studio 时拥有 Android SDK 2015.
然后我的第一个问题来了。当我尝试从命令提示符 运行 meteor add-platform android
时。我收到错误 找不到模块 'is-property',并很快学会了通过 cd'ing 到缺少模块的目录和 运行ning npm install is-property
。 A hat tip to this thread for the solution.
好的,再来一次:meteor add-platform android
这次成功了。然后我 运行 meteor run android
,果然,我的应用程序启动了一个模拟器。或者差不多。因为迎接我的第一条消息是 应用程序错误 - 与服务器的连接不成功 (http://localhost:12784) 并且应用程序崩溃了。
搜索了一下,好像是因为模拟器太慢了,流星脚本超时导致崩溃。所以我然后尝试安装 Android Studio to use Android AVD manager。但现在模拟器甚至无法启动,我得到了以下信息:
在 android 模拟器 上启动应用程序,然后...什么都没有。
所以我尝试卸载所有 android sdks、android studio 和 meteor。
然后我尝试
- 正在重新安装 meteor。
- 仅安装 Android SDK 命令行工具。
- Added the Android SDK to my environment variables.
- 运行 android.bat 以确保我安装了几乎所有最新的工具和图像以及 Intel x86 仿真器加速器(HAXM 安装程序)
- 我然后再次尝试 运行ning
meteor run android
命令,结果卡在 在 android 模拟器 上启动应用程序,如中所示第一张图
- 让 在 android 模拟器 上启动应用程序 运行 一个多小时,看看是否运行缓慢。
我也尝试在没有帮助的情况下遵循以下资源的建议:
- Android Emulator Hangs
- Meteor with android having issue starting app on the device and emulator
- Creating a new AVD- CPU/ABI field show 'No System images installed'
- Unable to create Android Virtual Device
顺便说一下,这是我的 AVD 配置的样子
那我做错了什么? 一切 不会是一个令人惊讶的答案。开个玩笑,我需要做什么才能在 windows 10 上为我的流星应用程序获得合适的 运行ning android 模拟器?
我得到了完全相同的结果,但我终于找到了问题所在。
我尝试了 运行 来自 command-line 的模拟器:
emulator -avd Android_Emulator
这实际上给了我一个有用的错误信息:
emulator: ERROR: x86 emulation currently requires hardware acceleration!
Please ensure Intel HAXM is properly installed and usable.
CPU acceleration status: HAXM is not installed on this machine
这个 Whosebug 线程帮助弄清楚了如何安装它:Intel X86 emulator accelerator (HAXM installer) VT/NX not enabled
然后成功了!真的真的很慢!但它奏效了。
尝试删除您的虚拟设备并重新创建它,或者尝试使用不同的虚拟设备。接下来,重建你的流星应用项目。
正在删除您的虚拟设备
Android-Studio >> 配置 >> AVD 管理器 >> 删除
就我而言,没有关于 Intel HXAM(已安装)的问题,但虚拟设备在很久以前就可以正常工作,突然间,"Starting app on android emulator" 从未结束。我认为,它与 cordova+npm 相关的问题有关。所以,试试这个。
在 meteor proyect 文件夹中,尝试使用
重建 de app-cordova 东西
- 正在删除 .meteor/local/corova-build
- 正在删除 .meteor/node_modules
- 使用 meteor remove-platform android && meteor add-platform android
删除和添加 android 平台
- 运行 命令 meteor rebuild && meteor npm install
- 确保兼容性 NodeJS 库。在我的例子中,meteor 1.8.2,nodejs 12.9.
今天我想测试 Meteor 的 android 构建是如何工作的。所以我安装了 Meteor 并根据 their instructions. Then pr. instructions from here 创建了一个测试 to-do 应用程序 我安装了 Java SDK,并确认我在安装 Visual Studio 时拥有 Android SDK 2015.
然后我的第一个问题来了。当我尝试从命令提示符 运行 meteor add-platform android
时。我收到错误 找不到模块 'is-property',并很快学会了通过 cd'ing 到缺少模块的目录和 运行ning npm install is-property
。 A hat tip to this thread for the solution.
好的,再来一次:meteor add-platform android
这次成功了。然后我 运行 meteor run android
,果然,我的应用程序启动了一个模拟器。或者差不多。因为迎接我的第一条消息是 应用程序错误 - 与服务器的连接不成功 (http://localhost:12784) 并且应用程序崩溃了。
搜索了一下,好像是因为模拟器太慢了,流星脚本超时导致崩溃。所以我然后尝试安装 Android Studio to use Android AVD manager。但现在模拟器甚至无法启动,我得到了以下信息:
在 android 模拟器 上启动应用程序,然后...什么都没有。
所以我尝试卸载所有 android sdks、android studio 和 meteor。
然后我尝试
- 正在重新安装 meteor。
- 仅安装 Android SDK 命令行工具。
- Added the Android SDK to my environment variables.
- 运行 android.bat 以确保我安装了几乎所有最新的工具和图像以及 Intel x86 仿真器加速器(HAXM 安装程序)
- 我然后再次尝试 运行ning
meteor run android
命令,结果卡在 在 android 模拟器 上启动应用程序,如中所示第一张图 - 让 在 android 模拟器 上启动应用程序 运行 一个多小时,看看是否运行缓慢。
我也尝试在没有帮助的情况下遵循以下资源的建议:
- Android Emulator Hangs
- Meteor with android having issue starting app on the device and emulator
- Creating a new AVD- CPU/ABI field show 'No System images installed'
- Unable to create Android Virtual Device
顺便说一下,这是我的 AVD 配置的样子
那我做错了什么? 一切 不会是一个令人惊讶的答案。开个玩笑,我需要做什么才能在 windows 10 上为我的流星应用程序获得合适的 运行ning android 模拟器?
我得到了完全相同的结果,但我终于找到了问题所在。
我尝试了 运行 来自 command-line 的模拟器:
emulator -avd Android_Emulator
这实际上给了我一个有用的错误信息:
emulator: ERROR: x86 emulation currently requires hardware acceleration!
Please ensure Intel HAXM is properly installed and usable.
CPU acceleration status: HAXM is not installed on this machine
这个 Whosebug 线程帮助弄清楚了如何安装它:Intel X86 emulator accelerator (HAXM installer) VT/NX not enabled
然后成功了!真的真的很慢!但它奏效了。
尝试删除您的虚拟设备并重新创建它,或者尝试使用不同的虚拟设备。接下来,重建你的流星应用项目。
正在删除您的虚拟设备
Android-Studio >> 配置 >> AVD 管理器 >> 删除
就我而言,没有关于 Intel HXAM(已安装)的问题,但虚拟设备在很久以前就可以正常工作,突然间,"Starting app on android emulator" 从未结束。我认为,它与 cordova+npm 相关的问题有关。所以,试试这个。
在 meteor proyect 文件夹中,尝试使用
重建 de app-cordova 东西- 正在删除 .meteor/local/corova-build
- 正在删除 .meteor/node_modules
- 使用 meteor remove-platform android && meteor add-platform android 删除和添加 android 平台
- 运行 命令 meteor rebuild && meteor npm install
- 确保兼容性 NodeJS 库。在我的例子中,meteor 1.8.2,nodejs 12.9.