Meteor教程:创建应用程序 - 步骤6 |为设备和模拟器执行Cordova命令时出错(Linux Mint Rosa)

时间:2016-04-07 12:19:29

标签: java android linux cordova meteor

我在做Meteor creating an app tutorial。对于第6步,我尝试在模拟器和HTC one mini 2设备上运行应用程序。它不起作用。

对于模拟器:

  • 我成功安装了最新的JDK
  • 当我执行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
  • 我成功安装了Android Studios
  • Meteor(JDK,Android SDK等)检查的所有要求都带有复选标记。

当我输入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

我不知道问题可能是什么。

对于设备:

  • 我启用了隐藏的开发者选项
  • 我启用了USB调试
  • 当我输入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
    

我真的没有看到问题,我没有在互联网上找到适当的解决方案来解决这个问题。我严格遵循教程步骤。

0 个答案:

没有答案