本文介绍了科尔多瓦"世界你好"应用程序将不显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来的Apache科尔多瓦和我无法得到科尔多瓦的Hello World应用程序显示在Android 。我说的是从所获得的默认应用程序从CLI科尔多瓦创建命令。

I am new to Apache Cordova and I can't get the Cordova "hello world" application to display on Android. I'm talking about the default application obtained from the "cordova create" command from the CLI.

我读的文件和安装的所有程序的要求(Node.js的,故宫,科尔多瓦5.0.0,我已经有一个Android SDK,所以我只需要更新PATH)。

I read the documentation and installed everything as required (Node.js, npm, Cordova 5.0.0, I already had an Android SDK so i just needed to update the PATH).

科尔多瓦告诉我的版本是成功的。

Cordova tells me the build is a success.

然后它说,应用程序启动,但在设备/模拟器的屏幕唯一改变的事情是,菜单打开(如以下图片)的

It then says the application is launched, but the only thing that changes on device/emulator screen is that a menu is opened (like on the following picture): http://i.stack.imgur.com/F7bI2.jpg

我想在一个模拟器和实际设备上,结果都是一样的。

I tried on an emulator and on a real device, results are the same.

我查了API版本,它似乎是足够高(4.0.3)。我在Windows 7下,与Oracle JDK。我想,也许一个插件失踪并安装科尔多瓦 - 插件设备,但它确实改变什么。

I checked the API version and it seems to be high enough (4.0.3).I'm under Windows 7, with an Oracle JDK. I thought maybe a plugin was missing and installed cordova-plugin-device, but it did change nothing.

这是一个错误还是我错过了什么?有一些是说得到一个错误报告(没什么异常出现的科尔多瓦运行Android命令)?

Is this a bug or do I miss something?Is there some mean to get an error report (nothing unusual appears with the "cordova run android" command)?

推荐答案

我终于想通。

问题似乎是,将APK安装不正确。该应用程序实际上能够运行,当我用下面的命令安装了它(如cordova运行Android执行罚款但是Android 4.1.2不启动应用): ADB安装< path_to_apk>

Problem seemed to be that the apk was not properly installed. The application was in fact able to run when i installed it with the following command (as recommanded by jojo in cordova run android executes fine. But Android 4.1.2 doesn't start the app): adb install <path_to_apk>

所以,我检查科尔多瓦code时看到APK安装,并手动启动科尔多瓦是使用命令会发生什么:

So I checked Cordova code to see what happens when apk is installed, and manually launched the command Cordova is using:

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

它返回:错误:未知的选项-d!

It returns: "Error: unknown option -d"!

如果你只是删除了-d选项,应用程序通常与运行科尔多瓦运行Android 在科尔多瓦5.0.0你会发现这个COMMANDE在行101的文件平台\机器人\科尔多瓦\ LIB \ device.js(和平台311线\机器人\科尔多瓦\ lib目录\ emulator.js为科尔多瓦仿真机器人)。

If you simply delete the "-d" option, applications run normally withcordova run android. On Cordova 5.0.0 you will find this commande 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).

我不知道这是什么-d选项被太...这是一个科尔多瓦错误?

I don't know what this "-d" option is meant too... Is this a Cordova bug?

正如里斯说,在注释:

-d 应该直接亚洲开发银行之后来(如 - 设备),而不是安装之后。所以,你可以将它去除它有吧。

另外,这里是Apache科尔多瓦问题跟踪器打开的问题

这篇关于科尔多瓦&QUOT;世界你好&QUOT;应用程序将不显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-11 09:48