科尔多瓦实际上并没有安装在Android设备上的应用程序 [英] Cordova does not actually install app on android device

查看:160
本文介绍了科尔多瓦实际上并没有安装在Android设备上的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Ubuntu 12.04安装科尔多瓦5.0.0 + Android SDK中API 22(安卓5.1.1)开发的应用程序。当我运行命令

I've setup cordova 5.0.0 + android SDK API 22 ( Android 5.1.1 ) on ubuntu 12.04 to develop an app. When I run the command

科尔多瓦运行--device

它建立没有错误的APK和表演

it builds without errors the APK and shows

总时间:3.177秒 内置下面的APK(S):     /var/www/tmp/test-app/platforms/android/build/outputs/apk/android-release-unsigned.apk 使用APK:/var/www/tmp/test-app/platforms/android/build/outputs/apk/android-release-unsigned.apk 在设备上安装应用程序... 启动应用程序... LAUNCH成功

Total time: 3.177 secs Built the following apk(s): /var/www/tmp/test-app/platforms/android/build/outputs/apk/android-release-unsigned.apk Using apk: /var/www/tmp/test-app/platforms/android/build/outputs/apk/android-release-unsigned.apk Installing app on device... Launching application... LAUNCH SUCCESS

然而这并不实际安装APK到设备。

which however does NOT actually installs the APK to the device.

我曾尝试使用安装就绪内置APK文件

I have tried to install the ready built APK file using

ADB安装-r /var/www/tmp/test-app/platforms/android/build/outputs/apk/android-release-unsigned.apk

和它的工作。

我试图从Web服务器下载的APK和设备上的本地安装它,它也工作了,所以我假定APK本身是确定的,设备是公认的。

I have tried to download the APK from a web-server and install it locally on the device and it also worked, so I assume the APK itself is ok and the device is recognized.

在APK已经安装在设备上的命令

When the APK is already installed on the device the command

科尔多瓦运行--device

产生在控制台相同的输出加上它启动的应用程序在设备上,但不安装它刚刚建成的较新版本。

produces the same output in the console plus it starts up the app on the device but does not install the newer version it just built.

我的Andr​​oid设备是HTC Desire的500运行的是Android 4.1.2,而我的Andr​​oid SDK中使用API​​ 22(安卓5.1.1)可能是这个问题?

my android device is an HTC Desire 500 running Android 4.1.2, while my Android SDK is using API 22 ( Android 5.1.1 ) could that be the problem ?

最后说明一点:我用科尔多瓦4.1.2安装了Android SDK的API 19在不同的机器上安装和它建立了项目很好,实际做安装应用程序

Final note: I have a setup on separate machine using cordova 4.1.2 setup with Android SDK API 19 and it builds the project well and actually DO install the app.

我会AP preciate你输入什么可能导致这种奇怪的行为。

I would appreciate your input on what might cause this strange behavior.

干杯

推荐答案

似乎是在科尔多瓦5.0.0中的错误,我在的 proprit 的答案= http://stackoverflow.com/questions/30149970/cordova-hello-world-app-wont-display">this线程解决了这个问题对我来说:

Seems to be a bug in Cordova 5.0.0, I had the same problem and the answer by proprit in this thread solved it for me:

在科尔多瓦5.0.0,亚行命令来安装的APK可以在行找到   文件平台101 \机器人\科尔多瓦\ LIB \ device.js(和在线路311   平台\机器人\科尔多瓦\ lib目录\ emulator.js的科尔多瓦的emulate   机器人):

On Cordova 5.0.0, adb commands to install the apk can be found at line 101 of file platforms\android\cordova\lib\device.js (and at line 311 of platforms\android\cordova\lib\emulator.js for cordova emulate android):

亚行-s+ resolvedTarget.target +安装-r -d+ apk_path +'

当前命令返回对​​我说:错误:未知的选项-d!如果你   只是删除了-d选项,应用程序与科尔多瓦正常运行   运行Android。

Current command returns to me: "Error: unknown option -d"! If you simply delete the "-d" option, applications run normally with cordova run android.

这篇关于科尔多瓦实际上并没有安装在Android设备上的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆