简体   繁体   中英

meteor run android-device stopped working

I upgraded to Meteor 1.2, but this may be unrelated.

I'm getting the following error when doing meteor run android-device

It seems it is searching for an android.jar file. I checked the path and the file exists. I even ran this command with sudo .

Errors executing Cordova commands:         

   While running Cordova app for platform Android with options --device:
   Error: Command failed: /c/Users/Uri/Code/afl-meteor/.meteor/local/cordova-build/platforms/android/cordova/run --device
   W/zipro   (14534): Error opening archive /c/Users/Uri/Downloads/android-sdk-linux/platforms/android-22/android.jar: Invalid file
   ERROR: Asset package include '/c/Users/Uri/Downloads/android-sdk-linux/platforms/android-22/android.jar' not found.

   FAILURE: Build failed with an exception.

   * What went wrong:
   Execution failed for task ':CordovaLib:processDebugResources'.
   > com.android.ide.common.internal.LoggedErrorException: Failed to run command:
   /c/Users/Uri/Downloads/android-sdk-linux/build-tools/22.0.1/aapt package -f --no-crunch -I
   /c/Users/Uri/Downloads/android-sdk-linux/platforms/android-22/android.jar -M
   /c/Users/Uri/Code/afl-meteor/.meteor/local/cordova-build/platforms/android/CordovaLib/build/intermediates/bundles/debug/AndroidManifest.xml
   -S /c/Users/Uri/Code/afl-meteor/.meteor/local/cordova-build/platforms/android/CordovaLib/build/intermediates/bundles/debug/res -A
   /c/Users/Uri/Code/afl-meteor/.meteor/local/cordova-build/platforms/android/CordovaLib/build/intermediates/bundles/debug/assets -m -J
   /c/Users/Uri/Code/afl-meteor/.meteor/local/cordova-build/platforms/android/CordovaLib/build/generated/source/r/debug --debug-mode
   --custom-package org.apache.cordova --non-constant-id -0 apk --output-text-symbols
   /c/Users/Uri/Code/afl-meteor/.meteor/local/cordova-build/platforms/android/CordovaLib/build/intermediates/bundles/debug
   Error Code:
   1
   Output:
   W/zipro   (14534): Error opening archive /c/Users/Uri/Downloads/android-sdk-linux/platforms/android-22/android.jar: Invalid file
   ERROR: Asset package include '/c/Users/Uri/Downloads/android-sdk-linux/platforms/android-22/android.jar' not found.


   * Try:
   Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

   /c/Users/Uri/Code/afl-meteor/.meteor/local/cordova-build/platforms/android/cordova/node_modules/q/q.js:126
   throw e;
   ^
   Error code 1 for command: /c/Users/Uri/Code/afl-meteor/.meteor/local/cordova-build/platforms/android/gradlew with args:
   cdvBuildDebug,-b,/c/Users/Uri/Code/afl-meteor/.meteor/local/cordova-build/platforms/android/build.gradle,-PcdvBuildArch=arm,-Dorg.gradle.daemon=true
   at ChildProcess.exitCallback (/tools/utils/processes.js:137:23)
   at ChildProcess.emit (events.js:98:17)
   at Process.ChildProcess._handle.onexit (child_process.js:820:12)

Using android sdk I removed the existing sdk for android 22 and reinstalled it. After that things were working again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM