我在做Meteor creating an app tutorial。对于第6步,我尝试在模拟器和HTC one mini 2设备上运行应用程序。它不起作用。
对于模拟器:
当我执行java -version
时,我得到了
java version "1.8.0_77"
Java(TM) SE Runtime Environment (build 1.8.0_77-b03)
Java HotSpot(TM) 64-Bit Server VM (build 25.77-b03, mixed mode)
javac -version
时,我得到javac 1.8.0_77
当我输入meteor run android
时,我收到此错误消息
=> Errors executing Cordova commands:
While running Cordova app for platform Android with options --emulator:
Error: Command failed: /home/lencewa/MeteorToDoList/simple-todos/.meteor/local/cordova-build/platforms/android/cordova/run --emulator
{ [CordovaError: No emulator images (avds) found.
1. Download desired System Image by running: /home/lencewa/Android/Sdk/tools/android sdk
2. Create an AVD by running: /home/lencewa/Android/Sdk/tools/android avd
HINT: For a faster emulator, use an Intel System Image and install the HAXM device driver
]
name: 'CordovaError',
message: 'No emulator images (avds) found.\n1. Download desired System Image by running: /home/lencewa/Android/Sdk/tools/android sdk\n2. Create an AVD by running:
/home/lencewa/Android/Sdk/tools/android avd\nHINT: For a faster emulator, use an Intel System Image and install the HAXM device driver\n',
code: 0,
context: undefined } 'No emulator images (avds) found.\n1. Download desired System Image by running: /home/lencewa/Android/Sdk/tools/android sdk\n2. Create an AVD by running:
/home/lencewa/Android/Sdk/tools/android avd\nHINT: For a faster emulator, use an Intel System Image and install the HAXM device driver\n\n at
/home/lencewa/MeteorToDoList/simple-todos/.meteor/local/cordova-build/platforms/android/cordova/lib/emulator.js:170:29\n at _fulfilled
(/home/lencewa/MeteorToDoList/simple-todos/.meteor/local/cordova-build/platforms/android/cordova/node_modules/q/q.js:834:54)\n at self.promiseDispatch.done
(/home/lencewa/MeteorToDoList/simple-todos/.meteor/local/cordova-build/platforms/android/cordova/node_modules/q/q.js:863:30)\n at Promise.promise.promiseDispatch
(/home/lencewa/MeteorToDoList/simple-todos/.meteor/local/cordova-build/platforms/android/cordova/node_modules/q/q.js:796:13)\n at
/home/lencewa/MeteorToDoList/simple-todos/.meteor/local/cordova-build/platforms/android/cordova/node_modules/q/q.js:604:44\n at runSingle
(/home/lencewa/MeteorToDoList/simple-todos/.meteor/local/cordova-build/platforms/android/cordova/node_modules/q/q.js:137:13)\n at flush
(/home/lencewa/MeteorToDoList/simple-todos/.meteor/local/cordova-build/platforms/android/cordova/node_modules/q/q.js:125:13)\n at process._tickCallback (node.js:458:13)'
at ChildProcess.exitCallback (/tools/utils/processes.js:151:23)
at ChildProcess.emit (events.js:98:17)
at Process.ChildProcess._handle.onexit (child_process.js:820:12)
/home/lencewa/.meteor/packages/meteor-tool/.1.3.1.nl5mvb++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/isopackets/cordova-support/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:116
throw error;
^
ExitWithCode:1
我不知道问题可能是什么。
对于设备:
当我输入adb devices
时,我得到了
List of devices attached
SH46RWR05243 device
但是当我运行meteor run android-device
时,我收到此错误消息:
WARNING: You are testing your app on a remote device. For the mobile app to be able to connect to the local server, make sure your device is on the same network, and that the network configuration
allows clients to talk to each other (no client isolation).
=> Errors executing Cordova commands:
While running Cordova app for platform Android with options --device:
Error: Command failed: /home/lencewa/MeteorToDoList/simple-todos/.meteor/local/cordova-build/platforms/android/cordova/run --device
Error code 1 for command: /home/lencewa/MeteorToDoList/simple-todos/.meteor/local/cordova-build/platforms/android/gradlew with args:
cdvBuildDebug,-b,/home/lencewa/MeteorToDoList/simple-todos/.meteor/local/cordova-build/platforms/android/build.gradle,-PcdvBuildArch=arm,-Dorg.gradle.daemon=true,-Pandroid.useDeprecatedNdk=true
undefined
at ChildProcess.exitCallback (/tools/utils/processes.js:151:23)
at ChildProcess.emit (events.js:98:17)
at Process.ChildProcess._handle.onexit (child_process.js:820:12)
/home/lencewa/.meteor/packages/meteor-tool/.1.3.1.nl5mvb++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/isopackets/cordova-support/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:116
throw error;
^
ExitWithCode:1
我真的没有看到问题,我没有在互联网上找到适当的解决方案来解决这个问题。我严格遵循教程步骤。