时出现此输出/错误
cordova run android --target 0152a65c02a27d5b --verbose
输出
No scripts found for hook "before_run".
No scripts found for hook "before_prepare".
Checking config.xml for saved platforms that haven't been added to the project
Checking for any plugins added to the project that have not been installed in android platform
No differences found between plugins added to project and installed in android platform. Continuing...
Generating platform-specific config.xml from defaults for android at /Users/r00/Projects/myappGo/myapp_app/platforms/android/res/xml/config.xml
Merging project's config.xml into platform-specific android config.xml
Merging and updating files from [www, platforms/android/platform_www] to platforms/android/assets/www
Wrote out android application name "myapp" to /Users/r00/Projects/myappGo/myapp_app/platforms/android/res/values/strings.xml
Wrote out Android package name "com.myappgo.myapp" to /Users/r00/Projects/myappGo/myapp_app/platforms/android/src/com/myappgo/myapp/MainActivity.java
This app does not have launcher icons defined
This app does not have splash screens defined
Prepared android project successfully
No scripts found for hook "after_prepare".
Checking config.xml for saved plugins that haven't been added to the project
ANDROID_HOME=/Users/r00/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home
Running command: /Users/r00/Projects/myappGo/myapp_app/platforms/android/gradlew cdvBuildDebug -b /Users/r00/Projects/myappGo/myapp_app/platforms/android/build.gradle -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true
BUILD SUCCESSFUL
Total time: 1.695 secs
Command finished with error code 0: /Users/r00/Projects/myappGo/myapp_app/platforms/android/gradlew cdvBuildDebug,-b,/Users/r00/Projects/myappGo/myapp_app/platforms/android/build.gradle,-Dorg.gradle.daemon=true,-Pandroid.useDeprecatedNdk=true
Built the following apk(s):
/Users/r00/Projects/myappGo/myapp_app/platforms/android/build/outputs/apk/android-debug.apk
No scripts found for hook "before_deploy".
ANDROID_HOME=/Users/r00/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home
Running command: adb devices
Command finished with error code 0: adb devices
Running command: adb devices
Command finished with error code 0: adb devices
Running adb shell command "cat /proc/cpuinfo" on target 0152a65c02a27d5b...
Running command: adb -s 0152a65c02a27d5b shell cat /proc/cpuinfo
Command finished with error code 0: adb -s,0152a65c02a27d5b,shell,cat,/proc/cpuinfo
Skipping build...
Built the following apk(s):
/Users/r00/Projects/myappGo/myapp_app/platforms/android/build/outputs/apk/android-debug.apk
Using apk: /Users/r00/Projects/myappGo/myapp_app/platforms/android/build/outputs/apk/android-debug.apk
Package name: com.myappgo.myapp
Installing apk /Users/r00/Projects/myappGo/myapp_app/platforms/android/build/outputs/apk/android-debug.apk on target 0152a65c02a27d5b...
Running command: adb -s 0152a65c02a27d5b install -r /Users/r00/Projects/myappGo/myapp_app/platforms/android/build/outputs/apk/android-debug.apk
Command finished with error code 255: adb -s,0152a65c02a27d5b,install,-r,/Users/r00/Projects/myappGo/myapp_app/platforms/android/build/outputs/apk/android-debug.apk
Error: adb: Command failed with exit code 255
at ChildProcess.whenDone (/Users/r00/Projects/myappGo/myapp_app/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:827:16)
at Socket.<anonymous> (internal/child_process.js:319:11)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at Pipe._onclose (net.js:486:12)
我安静地迷失在这里
答案 0 :(得分:1)
我的解决方法是删除一些应用。
手机暗示了一下;它不断弹出存储空间不足的信息。但是,我认为这与无法安装应用程序(最初)有关。
Connection: MTP (Media Device)
USB debugging: On
Device: LG Risio
Android version: 6.0
Cordova CLI: 6.5.0
Framework: Ionic 1.x
Ionic CLI: 2.2.1
Machine: Mac OS X Sierra
Node: 4.4.2
额外详情:
我一直在MTP和PTP连接之间切换。重启设备。而且,我一直在插拔设备并将其从计算机上拔下。没有任何效果。构建在控制台中始终是成功的。但不知何故,该应用程序刚刚没有安装在设备上。我有时会删除旧版本的应用程序,这可能会导致版本不一致的问题。但这也不起作用。当我从手机中删除3个大应用并尝试重新安装cordova run android
时,应用程序最终安装在手机上。
答案 1 :(得分:0)
从命令行运行
adb -s 0152a65c02a27d5b shell cat /proc/cpuinfo
并检查它是否失败以及如何失败。
作为
Running command: adb devices
Command finished with error code 0: adb devices
可能已成功或许您未检测到特定设备或无法获取cpuinfo。